Site logo

Archived topic

Template file name for Category under Custom Post Type

3 replies · Started by naisyo523 on June 11, 2017

Viewing posts 1–4 of 4

Hi, love GeneratePress!

I've created a Custom Post Type called "Events". Under Events, I have 3 different categories (Workshops, Support Groups, and Webinars)

Right now these category's index pages are displayed using "archive.php" and "content.php". But I'd like to use a custom template (because I want them to act differently than archive.php and content.php).

What file name I should use for it to work?

Thanks in advance!

E

Hi Tom, my Generatepress does not seem to choose the template file I created to display category page under my custom post types. It currently uses archive.php instead of using category-workshop.php. So my question is how can I make the Generatepress to use template name category-workshop.php according to their Taxonomy Template Hierarchy https://developer.wordpress.org/themes/template-files-section/taxonomy-templates/ I thought they automatically picks up the right file as long as it fits their hierarchy. I physically made file called category-workshop.php but it still choose archive.php instead.

Thank you!

I'm assuming workshop is the exact post type name? And it's a category?

Maybe try taxonomy-workshop.php or archive-workshop.php.

This archived topic is closed to new replies.