WordPress Tagging

Once I resolved some minor rewrite problems, Christine Davis’ brilliant plugin Ultimate Tag Warrior allowed me to add a tag cloud to my humble blog. I extended HJL’s workaround to fix problems I encountered with both tag feeds and traditional feeds.

First, the good news – Ultimate Tag Warrior (UTW) is amazing. Although WordPress Categories offer a flexible taxonomy, they are still rigid when compared to the free form nature of Tagging. UTW adds a tag box when writing posts – enter a list of comma-delimited tags, and UTW transparently offers a drop-in tag cloud as well as optional tag lists at the end of your posts.

In my environment – WordPress 2.0.2 and Ultimate Tag Warrior 3.1 – friendly URL rewrites were not working (e.g. /tag/TAGNAME vs. index.php?tag=TAGNAME). Apparently WordPress 2 added a PHP rewrite layer for new plugin flexibility, but this rewriting occasionaly breaks traditional .htaccess rewrites. For instance, WordPress now internally handles “/tag/TAGNAME” requests.

Building on the concept of HJL’s workaround, I created an .htaccess that offers friendly tag and feed rewrites. The in-line comments explain what each line does. Your mileage may vary.

Thanks in particular to Christine/UTW, and also to HJL, whose demo .htaccess was the first I found that was even close to what I wanted.

Be Sociable, Share!

Tags: ,

6 Responses to “WordPress Tagging”

  1. […] A hack from Nathan’s blog to get friendly URLs (E.G.: http://www.kgadams.net/tags/) to work. This still sort of bothers me, since the UTW developer, Christine, seems to imply she has it working with WordPress’ internal URL rewrite features […]

  2. Dean says:

    I still can’t seem to get my UTW to work with pretty URLs (website.com/tag/something). I’ve modified my .htaccess per your instructions to no avail. Could you take a look and see if you can figure out what’s the shizzle? Thanks a lot!


  3. Fabio says:


    with your htaccess detect the url and resolve the 404 problem, but doesn’t conect with the database.

    Do you Know what could be the problem?


  4. Fabio says:

    Here there are more datas of the problem:

    H t t p://www.nedial.net/tag/buscadores DOESN’T WORK

    SELECT * FROM wp_posts INNER JOIN wp_post2tag p2t on wp_posts.ID = p2t.post_id INNER JOIN wp_tags t on p2t.tag_id = t.tag_id WHERE 1=1 AND post_name = ‘buscadores’ AND (post_status = “attachment”) AND t.tag IN (‘buscadores’) GROUP BY wp_posts.ID ORDER BY post_date DESC

    h t t p://www.nedial.net/tag/buscadores/page/1 WORK

    SELECT DISTINCT * FROM wp_posts INNER JOIN wp_post2tag p2t on wp_posts.ID = p2t.post_id INNER JOIN wp_tags t on p2t.tag_id = t.tag_id WHERE 1=1 AND post_date_gmt

  5. Belen says:

    Left widget:
    I would be really thankful if you could help me with the code to have my tags format look like yours. This is my firts blog and I am trying to learn!!
    I also use Tiga theme.
    You have a great blog!!!

    My current code is:



  6. Cube Guy says:

    How did you get the permalinks to work in the tiga theme? I just started working WP, and you seem to have it working like a charm. When I use it, I lose all CSS style. I just want date and post name…Please help :)

Leave a Reply

Are you human? Answer this: *