- AuthorPosts
- May 10, 2020 at 6:54 pm #30954Oranges13Guest
I am working within Haven theme and would like several categories to have custom templates. I am able to create a template `categories-annnouncements.php` for example, but is there a base template that I need to copy in order to get this to work inside Haven or the Bold Grid framework?
My desire is to have a different sidebar on the Announcements page than on the default wordpress category page.
Thanks for any assistance you can provide.
May 11, 2020 at 3:18 pm #30955Jesse OwensGuestHello-
I can think of a couple of ways to accomplish this. Probably the easiest way would be to use a plugin like Widget Logic and test for is_archive() && is_category(‘announcements’). You can use this to determine which sidebar widgets show up based on the logic you need.
That said- if you do want to create a new template in a child theme of Haven you should check out base.php, and use the wrappers you see there. You can also make a file called archive.php, which will be used on category pages and you don’t need to use a wrapper for it to work.
- AuthorPosts
- The topic ‘How can I create a category template page?’ is closed to new replies.