I uses Ultimate Tag Warrior version 3.14159265 (February 4th, 2007) with WordPress 2.1, it work great but there have some problem or bug that when you try to open /tag it will show 404 errors. I check and try to make the page /tag or /tag/ show all tags with function of Ultimate Tag Warrior. Here is small changed.
-
function ultimate_tag_templates() {
-
if ($_GET["archive"] == "tag") {
-
include(TEMPLATEPATH . '/tag_all.php');
-
exit;
-
} else if (get_query_var("tag") != "") {
-
ultimate_get_posts();
-
-
if (is_feed()) {
-
-
return;
-
}
-
if ( $_GET["feed"] == '') {
-
include(TEMPLATEPATH . '/tag.php');
-
exit;
-
}
-
} else {
-
// include(TEMPLATEPATH . '/index.php');
-
}
-
}
-
}
This function will process when you query for tag but you will see if you request with empty value of tag it won’t process anything and let Wordpress process this and finally it give 404 errors
I just made some changes to handle when user query with empty tag or open at /tag or /tag/
-
function ultimate_tag_templates() {
-
if ($_GET["archive"] == "tag") {
-
include(TEMPLATEPATH . '/tag_all.php');
-
exit;
-
} else if (get_query_var("tag") != "") {
-
ultimate_get_posts();
-
-
if (is_feed()) {
-
-
return;
-
}
-
if ( $_GET["feed"] == '') {
-
include(TEMPLATEPATH . '/tag.php');
-
exit;
-
}
-
} else {
-
// include(TEMPLATEPATH . '/index.php');
-
} else {
-
include(TEMPLATEPATH . '/tags.php');
-
exit;
-
}
-
}
-
}
You may need to have file tags.php in your theme directory
Here is example of tags.php
-
<?php get_header(); ?>
-
-
<div class="primary">
-
-
<?php UTW_ShowWeightedTagSetAlphabetical("coloredsizedtagcloud","",0) ?>
-
-
</div>
-
-
<?php get_sidebar(); ?>
-
-
<?php get_footer(); ?>
You also can change function or parameters to display tag in the page as you want. Please see all detail here UltimateTagWarrior help
February 24th, 2007 at 10:35 pm
Another Day, Another Post…
[...] While surfing aimlessly today I came across this site: [...]…