Using categories and custom post types
-
I made a custom post type named “tutorial” (I set the URL to “tutorials”) with archive set to “True”.
So, when the user goes on domain-name/tutorials he gets archive-tutorials.php.
Now, here’s how I imagined it.
If the user goes to domain-name/tutorials he gets the names of the tutorial series.
But, if the user goes to domain-name/tutorials/cplusplus (for example), he gets the list of every single tutorial from C++ tutorial series.
Now, for every single one of my tutorial serie I made a category and I want to list all of the categories (all of the tutorial serie names) on domain-name/tutorials, and if the user clicks on one specific serie, he sees all of the custom post types (tutorials) belonging to that category (serie name).
However, I have trouble doing that (showing only custom post type categories on website-name/tutorials and if the user clicks on one, showing all the tutorials in that serie (and going to (for example) domain-name/tutorials/cplusplus).
I also don’t know how to add the URL domain-name/tutorials to the menu (Appearance > Menus), since I only see the option “Add Page”.
I’ve seen some older threads here with code included, I tested it all out but nothing seems to work.
So, how would I do that (show custom post type categories, showing all the posts from a category (if the user clicks on it) and add that URL to my navigation menu)? Maybe I need to use custom taxonomies instead of categories?
- The topic ‘Using categories and custom post types’ is closed to new replies.