UTW Theme Compatibility Thing

UTW Theme Compatibility Thing will allow the UTW template tags in existing themes to work with the native tag store in WordPress.

To Download
http://www.neato.co.nz/plugins/UTWRenderThing.zip has the latest version.

To Install
Copy the plugin to your plugins folder
Disable UTW, then enable this plugin (The two plugins share function names, so cannot run simulateously)

If you’re using icons in your formatting, there are a couple of extra steps.
Leave the UTW plugin folder on your webserver
Go to the Options > UTW Render Thing page, and enter a value for Base URL for Icons.

To Use
This plugin provides the functionality that the UTW_Show… functions in Ultimate Tag Warrior used to provide; except using the tags stored in WordPress. The formatting documentation for UTW remains largely the same for UTW-TCT (:

59 thoughts on “UTW Theme Compatibility Thing

  1. Pingback: power source*
  2. Great idea, I’m sure there are a ton of people who used UTW extensively in their themes like me and this will make life much easier.

    One thing, not really a bug, but I thought you might be interested: around line 341 or so, you’ve got this:

    $weight = $tag->count / $maxtag;

    If $max_tag happens to be zero, you’ll get a divide by zero error. Might not be a very likely case, but I ran into it on a blog with no tags yet. Thanks again for you great plugins.

  3. As always, thanks, Christine!

    I’m having one problem, though: with “UTW_ShowTagsForCurrentPost(“commalisticons”)”, I end up with something like “tag1 %icons%, tag2 %icons” showing up in my blog page. I’ve changed the Render options base URL several different ways, including the logical one (/wp-content/plugins/UltimateTagWarrior) to no avail.

    Any ideas as to what stupid thing have I done wrong now?

  4. Andy,

    Ooh. Not just at the moment, unfortunately – that uses all sorts of other UTW stuff on the back end for retrieval, and I haven’t done the magic with that just yet.

    That said, I have started looking at its replacement…

  5. Hi Christine,

    thanks for the update! i have a problem. i use
    in my template but nothing shows up. i have wp 2.3.1 disabled UTW and activated tis plugin.
    same is when i use

    if (is_tag()) { UTW_ShowCurrentTagSet(‘tagsettextonly’); } etc. nothing comes up

    thank you!

  6. Hi Christine,
    again many thanks for the plugin! 🙂
    There seems to be a problem in combination with the wp-cache plugin – once the cache is activated, all UTW functions return empty contents…

  7. … but the
    returns a

    Warning: Invalid argument supplied for foreach() in wp-content/plugins/UTWRenderThing.php on line 561

    and the a list of related post is shown. :-/

  8. sorry for the comment-flood…
    I did a print_r($tags) at the line 561 mentioned above and it showed that $tags is empty, so the next foreach(…) loop returns the error.
    I added a if( is_array($tags))...(/if) around the foreach loop, and now the warning is gone.

  9. arghhh… ok, this is my last comment today, I promise 🙂
    The UTW_ShowRelatedPostsForCurrentPost(”posthtmllist”) does not work at all (maybe due to the $tags being empty?) – it always shows the 5 latest post where the related posts should be.
    I will dig around some more and if I find something, I’ll let you know.

  10. ok, I think I found it: to fill $tags, you use get_the_tags() (on line 26), but according to the wordpress codex this has to be done inside the loop. in my theme, the UTW_ShowRelatedPostsForCurrentPost() function is called in the sidebar – outside the loop – so $tags will be empty.

  11. How less perfect the world is if UTW isn’t working properly…

    I installed the UTW Theme Compatibility Thing for a WP 2.3.1 install, and a call like UTW_ShowWeightedTagSetAlphabetical(“coloredsizedtagcloud”,””,”30″) that used to produce a really pretty tag cloud using UTW (good size variation between the tags) now produces one that looks a lot like a tag cloud produced using the built-in WP functions (ie, very little size variation). Also, changing the font sizes in UTW Render Options doesn’t produce any changes in the tag cloud, even increasing the most popular font size 10X, but changing the font colors does produce a change in the tag cloud.

    Any thoughts?

  12. Hi Thanks for the plugin. One of my readers emailed me this error. Can you help?

    <meta name=”keywords” content=”
    Fatal error: Call to undefined function: get_the_tags() in /home/johanhor/public_html/helpmetoblog/wp-content/plugins/UTWRenderThing.php on line 18

  13. Hey Christine:

    First, thank you so much for the Many Many years with UTW…I love(d) it. In fact, because UTW broke in WP 2.3, I have refused to upgrade…until now. While there are many many items that I miss, I really wanted my “weightedlongtailvertical” to work…and well it didn’t. Even with this RenderThing. So, I…sorry…hacked it.

    I replaced:

    $format = str_replace(‘%tagrelweightint%’, ceil($weight), $format);


    $format = str_replace(‘%tagrelweightint%’, ($weight*100), $format);

    …and that seemed to do the trick. I know it’s ugly, but it worked.

    Hope all is well with you in the new year.

    Your loyal follower,

  14. I can confirm everything frisco said, with one addition. The generated tag cloud is limited to 30 tags but they’re not the tags that have been used most often. In other words, the “Weighted” in UTW_ShowWeightedTagSetAlphabetical isn’t working 🙂

    So my tag cloud is just alphabetically displaying the first 50 (in my case) tags it finds (instead of top 50), and adjusting the font-size according to how many times each tag has been used.

  15. Wow thanks. I thought I was going to lose UTW.

    I wont be able to use all of the old tags that I have already entered with the old UTW will I?

    Also, no matter how I change the font size in the manage area, the font is huge. Well bigger than I would like. I would like it Least popular 12 px, Most popular 16 px Its just not working out that way.

    any ideas?

  16. Hi Christine

    I get the following error after installing the UTW plug in.

    Warning: Invalid argument supplied for foreach() in /home/remove/public_html/wp-content/plugins/UTWRenderThing/UTWRenderThing.php on line 524

    Warning: Invalid argument supplied for foreach() in /home/remove/public_html/wp-content/plugins/UTWRenderThing/UTWRenderThing.php on line 561

    Are there any details on what I need to do to fix this? I have no experience with code so please make it easy to understand!

    Thanks a lot

  17. Hey this sure looks intresting. I’ll check it out. I just started experimenting with wordpress and bumb into your website. You’ve a nice website, keep up the good work! 🙂

  18. Hi Christine

    Thanks for this great plugin, I finally upgraded to 2.3 and thanks to this plugin I can still use UTW. Kewl.

    I think there’s a small bug, though, as I can’t alter the size of the tags in the cloud. No matter what I specify, it’s always 22 pts for the largest one and 8pts for the smallest.

    Anyway, keep up the good work and good luck with all your future projects!

  19. Christine: I haven’t upgraded WP in quite a while & I’ve just upgraded to 2.5. I see UTW is no longer supported. I’ve tried using the new default tag system in WP, but my tags aren’t displaying at the bottom of my published posts like they used to w. UTW. How do I retain this feature? Will this plugin do that for me?

  20. I am getting the same error after upgrading to WP 2.5.1

    Warning: Invalid argument supplied for foreach() in /home/contribu/public_html/blog/wp-content/plugins/UTWRenderThing/UTWRenderThing.php on line 561

    The script is actually working but the error shows at the very Beginning.

    Any ideas on how to fix this?

  21. This is a great post and have kept it in my diary. Will continue to read it as i’m very new to a lot of the points you mention!

    Thanks though, i’m glad some people share good stuff like this!

  22. I upgraded my WordPress blog to WP 2.8 from old WP 2.0.3 and tryed to
    activate UTW 3.14 and it fails, then I installed the UTW Them Compatibility Thing and
    it activates. I added a WordPress tag to a post updated the post but don’t see
    the tags. I’m using a custom them, so I switched the theme to the default theme
    and I see the tags for the post.

    The tags showed up fine when on WP 2.0.3. Do you know what I’m doing wrong?


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s