Which template should I start from to best get a tag.php template done?
Or did I miss something in the existing features again?
Which template should I start from to best get a tag.php template done?
Or did I miss something in the existing features again?
Hey Nomad411,
I have already assigned another member of the team to assist you with your inquiry.
Ben
Hi Gerard,
The index.php file in the theme is what generates the generic blog/archive layout. You can copy that and rename it tag.php. Let me know if you have any questions.
Justin
oh?? I was looking through all the single and content and everything else.
Cheers
The content.php file contains the code for each individual post in an archive layout. If you need to customize that, you can copy it and name it content-tag.php. Then you’ll need to replace this line in tag.php…
<?php get_template_part('content', get_post_format()); ?>
with this…
<?php get_template_part('content-tag', get_post_format()); ?>
Justin
Ok, I see.
I’ll give that a go then,
thanks
THAT, was too easy
I’m presuming that CATEGORY works the same so off to check that now
Thanks.
You are correct!
Here’s a detailed post on how all of that works…
https://codex.wordpress.org/Template_Hierarchy
Here’s an image that shows the template hierarchy…
https://codex.wordpress.org/images/9/96/wp-template-hierarchy.jpg
Justin
Yep yep!
I’ve been hesitant to edit templates so far, as you might have changes to the theme in the future, but I’ll try to keep track of them I guess.
I’m sure that BB will someday let us edit a wider range of default pages
Hi Gerard,
As long as you make these changes in a child theme, you shouldn’t have to worry about updates. Yes, we would love that functionality someday as well
Justin