Few times I was asked how EXACTLY create file to display archive for posts with given tag. I have to admit that information given on official UTW site are rather… short ;) so here is little bit longer explanation.
I have copied content of archive.php file to Notepad. Then I removed all conditionals specifying what kind of archive it can be. I’ve replaced them with following piece of code:
<h2 class="post-title">Archive for posts tagged with
<?php if (is_tag()) UTW_ShowCurrentTagSet("tagsetcommalist"); ?>
Since there is only one condition I had to also remove character } from first line right below that code. Then I saved file as tag.php and put it on server to theme folder. And that’s all.
You can check how does it work choosing any tag either in the post or in the sidebar.
And below there is complete tag file (saved as *.txt) for you to download.
NOTE! It’s a file for Nigarila theme I use on this site. If you use other theme you will have to change part that states how post are being displayed. Have fun!
PS. I do realize that tomorrow new version of WP (2.3) with built in tags shows up. But.. not everyone is going to upgrade immediately. Moreover Christine (UTW author) is working on new version of her plugin which will work with new WP so.. you may find my mini ‘tutorial’ useful anyway .
23rd September 2007 no comments yet