Hello,
I have created CPT Card which has following taxonomies card_category and card_tag. I have setup the CPT and taxonomies in the Theme Settings. However, whenever I click on the taxonomy on the single post, it is giving 404 Error In permalink, it’s looking into the category, however, as per my knowledge it should add card_category or card_tag
For example, my Card (post) has card_category Tuition the permalink for Tuition should be something like this http://site.com/card_category/tution but it is now redirecting to http://site.com/category/tution
When I checked the code and not so sure whether I understood the code correctly or not but I found you have used get_the_category() but as per my knowledge that only works with the post category and for the custom taxonomy we support to use get_the_terms().
Please let me know how can I add the custom taxonomies as well as CPT to all archives.
Well, it was my mistake. I have registered taxonomy as card_category but slug was the category that was creating an issue. I have solved it. 🙂
However, I still have a question. How can I create CPT archive to list all Cards same like Post archive? Is there any setting or I have to create template?
-
This reply was modified 9 years by
jatinsoni.
Hi,
You can display the custom posts in any of the theme blocks for example. The blocks have the option to filter posts by custom post type
– https://forum.tagdiv.com/block-settings-guide/
Thanks
