Archived topic
customize taxonomy page
5 replies · Started by jasond on December 11, 2020
Hello
Can you give me a quick advise on how I can customize the taxonomy page.
For example I want to get rid of the <article id=""> of each post and replace it with my custom div box.
<article id="post-1323" class="post-1323 cruise type-cruise status-publish has-post-thumbnail hentry" itemtype="https://schema.org/CreativeWork" itemscope="">
And add some ACF fields into the div box.
Many thanks
Hi there,
the <article> tag is baked into the theme templates - as you can see here:
You would need to create a new archive template and a new content template for that archive in order to change them.
Thank you a lot
Can you show me the original archive template file i can clone?
Hi,
Can you show me the original archive template file i can clone?
You can find the default archives.php here.
https://github.com/tomusborne/generatepress/blob/master/inc/structure/archives.php
Thank you
So I cloned archives.php to taxonomy-book_category.php and cloned content.php to content-book_category.php
How do I link them together?
You can follow Tom's replies here on how to do this.
https://generatepress.com/forums/topic/building-custom-template-for-cpt-single-archive-php-pages-with-gp/
I believe linked the wrong file for this particular from my previous reply. My bad.
use this archives.php instead.
https://github.com/tomusborne/generatepress/blob/master/archive.php