Category single page template
-
I have a main Event Category and two sub categories – A and B.
I’d like to have different templates for A and B so that each show a different sidebar. I would also like to show previous and next events within those categories at the bottom of the event page. I only want to use the event category, not the WordPress post categories to achieve this.
I have single-event.php set up but of course this generates a template for all single Events pages. I’m unsure what code I will need in order for the page to detect the category ID and then generate content accordingly. I am also trying to use get_adjacent_post to show previous and next events within the same category, but it’s not displaying that at all.
Is there any way to drill down template pages so that specific sub categories in Events show different templates when viewing the single event?
- The topic ‘Category single page template’ is closed to new replies.