How to Convert UTW to WordPress 2.3 Tags in Current K2 Based Themes?


If you are new here, Subscribe to Full Feeds or by Email and receive free daily updates on Tips, Tricks and Tweaks..


Its been couple of months since WordPress 2.3 was released. That was the time when WordPress Native Tagging System was introduced. Since I did not have time in hand, I decided to follow Ultimate Tag Warrior (UTW). But now WordPress 2.5 is soon to be released and I did not want to complicate things in the future so I decided to upgrade my tagging to WordPress tagging system. The main reason is that now Windows Live Writer supports WordPress Native Tagging and I wanted to use that feature.

It was much simpler than I thought. Since I am using my modified version of K2 theme, I thought it would be helpful for K2 theme users who still have not moved to WordPress Native Tagging.

Two important functions that you may be required to know about Native tagging are the_tags and wp_tag_cloud. These correspond to UTW_ShowTagsForCurrentPost and UTW_ShowWeightedTagSetAlphabetical from UTW tagging.

The general usage of these functions can be see here


<?php the_tags('before', 'separator', 'after'); ?>
Example
<?php the_tags('Tags:', ', ', '<br />'); ?>

<?php wp_tag_cloud(''); ?>
For Cloud limited in size and ordered by count rather than name
<?php wp_tag_cloud('smallest=8&largest=22&number=30&orderby=count'); ?>


In case you are using other themes than K2, you can search for these and try to figure out how to change. You can refer to the usage of these functions for more - the_tags & wp_tag_cloud.

In K2 based theme, these are the changes you may be required to do.

First in theloop.php change the following code (In other themes the similar code may be in index.php or single.php)


<?php /* Tags */ if (is_single() and function_exists('UTW_ShowTagsForCurrentPost')) { ?>
<span class="entry-tags"><?php _e('Tags:','k2_domain'); ?> <?php UTW_ShowTagsForCurrentPost("commalist") ?>.</span>
<?php } ?>

to


<?php /* Tags */ if (is_single() and function_exists('the_tags')) { ?>
<span class="entry-tags"><?php _e('Tags:','k2_domain'); ?> <?php the_tags(' ',',',''); ?>.</span>
<?php } ?>

and in page-archives.php change the following code


<?php if (function_exists('UTW_ShowWeightedTagSetAlphabetical')) { ?>

<h3><?php _e('Tag Cloud','k2_domain'); ?></h3>
<p><?php printf(__('The following is a list of the tags used at %s, colored and \'weighed\' in relation to their relative usage.','k2_domain'), get_bloginfo('name')); ?></p>

<?php UTW_ShowWeightedTagSetAlphabetical("coloredsizedtagcloud"); ?>

<?php } ?>

to


<?php if (function_exists('wp_tag_cloud')) { ?>

<h3><?php _e('Tag Cloud','k2_domain'); ?></h3>
<p><?php printf(__('The following is a list of the tags used at %s, colored and \'weighed\' in relation to their relative usage.','k2_domain'), get_bloginfo('name')); ?></p>

<?php wp_tag_cloud('smallest=8&largest=36&'); ?>

<?php } ?>

You can add the functionality of native tagging by using Wordpress Things plugins from Christine.
Tag Suggest Thing
Embedded Tag Thing
Tag Managing Thing
Inline Tag Thing

Note: Before importing its wise to take a database backup! 

To import the old UTW tags to the native wordpress tags. Click Manage -> Import -> Ultimate Tag Warrior. Follow the steps its fairly simple and its very quick.


Related Posts:
  • Link O! Byte - 6
  • Why Popular Firefox Themes have IE or Vista look? – Poll
  • How to Update Windows Live Writer After Changing Blog Theme?
  • Why taking a backup copy is necessary for your blog and how to do it?
  • How to Delete Folders or Tags in Google Reader?


  • Enjoyed this post? Subscribe to Full Feeds or by Email and receive free daily updates on Tips, Tricks and Tweaks.


    2 Responses to “How to Convert UTW to WordPress 2.3 Tags in Current K2 Based Themes?”


    1. 1 Christine D.

      /hides

      I have a plugin for that!. Although I see it’s not linked from the main WordPress Things page.

      I’m jus’ gon’ fix that…

    1. 1 theclonchs.com » Blog Archive » Jumping to Wordpress 2.5

    Leave a Reply




    LyteByte Full Feed

    About Lyte Byte & Me

    Bringing you Tips, Tutorials, and Tweaks on Computers, Internet, Operating System, Windows Vista, Office Applications, Web 2.0, Gadgets, Science, and Technology.
    Its a byte of technology, did you have your byte today?


    subscribe through Email




    Close
    E-mail It