Hello guys,
Firstly, my application is on the localhost, so I will not be able to provide any code or repo.
I am having issue when adding custom taxonomy on frontity settings.
blog -> custom post type
blog-category -> taxonomy
My url structure is like below:
-
http://domain.com/blogs/blog-category/blog-post -> isPost
-
http://domain.com/blogs/blog-category -> isArchive
This has been configured on wordpress side and works efficiently.
Frontity settings:
** postTypes: [
{
type: âblogâ, // type slug
endpoint: âblogâ, // REST API endpoint
archive: â/blogâ, // link where this custom posts are listed,
}
],
taxonomies: [
{
taxonomy: âblog_categoryâ,
endpoint: âblog_categoryâ,
postTypeEndpoint: âblogâ,
},
]
**
But on frontity , First url structure works as expected, but second is not found. I am having below issue:
{
** isError: true,**
** isReady: true,**
** isFetching: false,**
** is404: true,**
** errorStatus: 404,**
** errorStatusText: âpost type from endpoints âposts,pages,mediaâ with slug âblog_categoryâ not foundâ**
}
I assume that taxonomy settings conflicts with postType settings. Please help me to resolve this issue.
Hi @talehmuzaffer
Welcome to the community. One thing I noticed is that your paths have âdashesâ:
http://domain.com/blogs/blog-category/blog-post -> isPost
http://domain.com/blogs/blog-category -> isArchive
Whereas your taxonomy definitions use âunderscoresâ:
taxonomy: âblog_categoryâ,
endpoint: âblog_categoryâ,
Could that be the reason itâs not working?
Hello, @mburridge Thanks for replying.
No it cannot be the issue, as the blog-category is not the taxonomy name but taxonomy value. taxonomy name is blog_category. You can replace blog-category (with dashes) with another one (for ex. , marketing)
One more issue is that , whenever I click the proper link
http://domain.com/blogs/blog-category/blog-post works well, but it is not found when i refresh the page.
It is very overwhelming for me
Hi @talehmuzaffer
Iâm afraid your problem is quite confusing as youâve named your Custom Post Type blog
and your Custom Taxonomy blog_category
. This is confusing because WordPress provides the Post
Post Type and the Category
taxonomy for blogging purposes, so itâs hard to understand what youâre trying to do or what your Custom Post Type and Custom Taxonomy are for.
I think to help you further we are going to need a repo and ideally a WordPress site that we can access. Please see this guide for the kind of info to provide so we can best help you.
1 Like