The Ultimate Tag Warrior is probably one of the best plugin out there for WordPress. It is a powerfull and complex plugin, with lots of template tags. You can customize these template tags too, but do looks rather complicated and confusing to do.
Here are some ideas from aoina, a one of the WordPress user in Japan.
This will output the feed icons infront of each tag. Just like the similar feature for the categories.
<ul><?php UTW_ShowWeightedTagSet("", array("default"=>'<li><a href="%tagurl%feed/" title="feed"><img src="'.get_bloginfo('template_url').'/images/feed-icon.gif" alt="feed" title="feed" /></a> <a href="%tagurl%" title="%tagdisplay% (%tagcount%)">%tagdisplay%</a>(%tagcount%)</li>'), 10); ?></ul>
I love this one. Just what I wanted. It’s easier to see, than to explain. If you click ‘plugin’, it will return the entries tagged ‘plugin’. But if you click ‘+’ infront of ‘plugin’, it will return the entries tagged with ‘wordpress’ AND ‘plugin’.
There is a similar ajax-powered feature which comes with UTW, but this is much simpler and lighter, I think.
Here is the code I use in tag.php. I display it slightly different, compared to how Aoina.com do.
<p><?php UTW_ShowRelatedTagsForCurrentTagSet("", array(//hack to show +
'single' => '%intersectionlink% <a href="%tagurl%" title="%tagdisplay% (%tagcount%)">%tagdisplay%</a>(%tagcount%)',
'default' => '%intersectionlink% <a href="%tagurl%" title="%tagdisplay% (%tagcount%)">%tagdisplay%</a>(%tagcount%), ',
'last' => '%intersectionlink% <a href="%tagurl%" title="%tagdisplay% (%tagcount%)">%tagdisplay%</a>(%tagcount%)'
)); ?></p>
These two customization uses $format for custom formatting.
When you display an archive for a tag, only your blog title is displayd in the title. For SEO, it would be better to display the tag name here. T the bottom of ultimate-tag-warrior-actions.php, add this code:
add_filter('wp_title', 'utw_blogtitle',1);
function utw_blogtitle($title){
if(get_query_var("tag") && !$title) return " » " . get_query_var("tag");
}
This actually didn’t work for me, as I use the Optimal Title plugin. So instead, I edited optimal-title.php. Near the end, between if ($single) { ... } and if ($display && isset($title)) { ... }.
if(get_query_var("tag") && !$title) {
$title = get_query_var("tag") . "$sep Tag Archive";
}
Like me, if you use WP-PageNavi, there is a bug when an archive of two or more tag is displayed. If ‘wordpress’ tag has 5 entries, and ‘plugin’ tag has 3, ‘wordpress+plugin’ should return total of 3 entries. But WP-PageNavi returns 8 entries.
Edit the lines 37 to 39 of pagenavi.php, from:
preg_match('#FROMs(.*)sGROUP BY#siU', $request, $matches);
$fromwhere = $matches[1];
$numposts = $wpdb->get_var("SELECT COUNT(DISTINCT ID) FROM $fromwhere");
to this:
if( strpos(get_query_var('tag'), " ") ){
preg_match('#^(.*)sLIMIT#siU', $request, $matches);
$fromwhere = $matches[1];
$results = $wpdb->get_results($fromwhere);
$numposts = count($results);
} else {
preg_match('#FROMs(.*)sGROUP BY#siU', $request, $matches);
$fromwhere = $matches[1];
$numposts = $wpdb->get_var("SELECT COUNT(DISTINCT ID) FROM $fromwhere");
}
[These tips are by AOINA.COM]
0