- This topic has 5 replies, 2 voices, and was last updated 2 years, 9 months ago by Tom.
February 11, 2018 at 5:43 pm #493920George
Hello. New GP Premium user here, loving the theme so far!
I got a strange issue that is impossible to solve. I have created a custom post type called “video” with the Custom Post Type UI plugin, set it to have an archive and also to have the native categories and tags as taxonomies but when I visit that archive page I get a page not found.
Another thing that is probably related to this is also very strange. All tag and categories that have been created are visible in both the native post type and the custom post type! Also when I create a new category for the custom post type, the same category is visible in the native post type and vice versa!
I really don’t know what’s going on.
I have added custom post type posts to a category called Videos. This category for some reason cannot be deleted and it is also visible in the native posts taxonomy list on the admin(cannot be deleted from there either).GeneratePress 2.0.2GP Premium 1.5.6February 11, 2018 at 9:04 pm #494033TomLead DeveloperLead Developer
Sometimes after creating a new CPT, you need to re-save your permalinks. Go to “Settings > Permalinks” and hit the save button.
As for the terms, it’s hard to tell. It could be the way they’re initiating the custom taxonomy/terms? Might be worth asking the plugin developer.February 12, 2018 at 8:42 am #494501George
Ok thanks Tom. I have sorted the archive issue.
For other users that might have a similar problem:
Out of the box, WordPress does not include custom post types in the archives for the default categories and tags archives. Because of this, you need to add the post types to the query yourself using the code found on this page.
I still haven’t resolved the duplicated tags and categories issue though, I will post here again when I do!February 12, 2018 at 8:17 pm #494890TomLead DeveloperLead DeveloperFebruary 13, 2018 at 7:43 am #495328George
I got an answer from the developer on the second issue.
Basically to have completely independent taxonomies for my new custom post type I would need to create new taxonomies for it with a unique slug from the UI. Label can still be category but slug should be something like “video-category”. I might actually keep it as it is just because I need to keep the category/video slug.
Aaaaanyway, sorry for the off topic nature of the post, at least it might save some time for other users in the future!February 13, 2018 at 9:38 am #495458
- You must be logged in to reply to this topic.