joshrodgers
Member
Posted 1 year ago #
I am creating a restaurant website that has a "menu" custom post type. I am using categories to separate the different menu sections (appetizers, desserts, beverages, etc.).
However, what I've noticed is categories are categories...so categories that are not specific to my custom post type also show up (like blog, slider, etc.). Is there any way to only show the specific categories that are relevant to my custom post type...or...is there any way to exclude or hide categories that aren't specific to my custom post type?
Thanks,
Josh
joshrodgers
Member
Posted 1 year ago #
kessiemeijer,
The taxonomy solved my problem!!
Ok, so all I had to do was add the following to my functions file: http://pastebin.com/H00nfgx2.
"menu" is the name of my custom post type, if you'd like to add it to a normal post, all you have to do is change "menu" to "post".
The title is "Categories", to change this to read something else look under label in the array and change the word "Categories" to "Your Title".
Very simple! Works like a champ!!
Thanks,
Josh
Well done! I'm glad you resolved it.
joshrodgers
Member
Posted 1 year ago #