R i c h G i l c h r e s t . c o m

How To Add Wordpress 2.3 Tags To Your Current Theme, Part 2


No image for: How To Add Wordpress 2.3 Tags To Your Current Theme, Part 2

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

How To Add Wordpress 2.3 Tags To Your Current Theme

Christine Davis, author of Ultimate Tag Warrior, dropped by the comments to say that UTW would be updated to work with the WP 2.3 tagging system. This is good news for all fans of UTW who appreciate the added flexibility and utility of the very popular plug-in.

Some of the questions that have been asked on my previous article:

Does Wordpress 2.3 have a means of importing Ultimate Tag Warrior / Simple Tagging / Jerome’s Keywords tags?

As of WP 2.3 Beta 2, it appears these tagging systems are imported automatically. Beta 3 was the first that I installed, and I remember that there were no options or extra steps I had to take to import UTW tags. Otto, who seems to be a Wordpress developer, makes it pretty clear in that support thread that he considers most of the tag management menus to be superfluous, and that’s why there are no options menus in WP 2.3 that would make it obvious what did or did not get imported.

How do you customize the tag display?

I guess the code doesn’t really give you much insight. Here are three of the ways you can customize your tag display:

Tags on one line
<?php the_tags('Article Tags>> ', ' | ' , ''); ?>

Tags as a single list item
<?php the_tags('Tags<LI>', '<BR />' , '</LI>'); ?>
This would look better with additional changes to your STYLE.CSS, where you can customize the way lists are displayed.

Tags as individual list items
<?php the_tags('Tags<LI>', '<LI>' , '</LI>'); ?>

Can updated themes be used by people who haven’t switched to WP 2.3?

Important info for theme designers! Blogging Pro asked this on his blog and Nathan Rice was quick with an answer. PHP allows you check whether a function exists before you use it. If you wrap your tag call within a conditional statement, the tag call would only be made by WP 2.3+ users. If you enter the tag code without this conditional statement, and a WP 2.2 user loaded your theme, the code would probably kick out an error message. Theme designers will want to wrap their tag code like this:

<?php if ( function_exists('wp_tag_cloud') ) : ?>
<?php the_tags('Article Tags>> ', ' | ' , ''); ?>
<?php endif; ?>

I’m headed to work now… any other questions, certainly ask I’ll try to find the answers!

42 Responses

  1. Gravatar

    ?????????? Wordpress 2.3 ? Tags ?? 2 | Dreamcolor's Cote

    September 21st, 2007 at 2:24 pm

    1

    [...] ?????How To Add Wordpress 2.3 Tags To Your Current Theme Part 2 ??????????????? Wordpress 2.3 ? Tags ?? [...]

  2. Gravatar

    Antonio

    September 21st, 2007 at 5:27 pm

    2

    Hello. What do I have to do if I want to print, in the tag.php page, the name of the clicked tag? Something like “All entries with tag ‘xxx’” on top of the page. Thanks! Antonio

  3. Gravatar

    Niky

    September 22nd, 2007 at 9:42 am

    3

    I’m wondering why you closed (?>) and opened (

  4. Gravatar

    Niky

    September 22nd, 2007 at 9:44 am

    4

    Seems like that destructed my comment. I meant to ask why you opened and closed the php tag in that last piece of code?

    Nice work for the rest though. I’m very happy UTW will support the 2.3 tag system.

  5. Gravatar

    berny

    September 22nd, 2007 at 11:13 am

    5

    hi folks!

    have you got any idea who to get the tags into a php variable? - i would need that for example to pass them onto flickr for mash-up.

    berny

  6. Gravatar

    Ryan B

    September 22nd, 2007 at 4:38 pm

    6

    Niky - PHP allows you to write IF statements two ways. The first is with curly braces — if(something){do whatever is in here}. The second doesn’t use curly, but uses the endif command to say this is the end of the IF statement. It is just a coding practice to put it on it’s own line.

  7. Gravatar

    Joe Clark

    September 22nd, 2007 at 10:14 pm

    7

    You need to close each LI element, and you should not use BR in an LI unless you really absolutely know what you’re doing.

  8. Gravatar

    Resources to Earn Money Online: Ellipsis Aeon, Software » Getting Your Blog Ready for WordPress 2.3, Online Project Solutions

    September 22nd, 2007 at 10:38 pm

    8

    [...] Gilchrest has some excellent articles on how to prepare you WordPress themes for 2.3; Part One and Part Two. Now we need to make sure that all those cool, site enhancing plugins are compatible. A quick check [...]

  9. Gravatar

    links for 2007-09-22 | betohayasida.net

    September 22nd, 2007 at 11:31 pm

    9

    [...] Aiming for Independence » Blog Archive » How To Add Wordpress 2.3 Tags To Your Current Theme, Part… (tags: wordpress:theme) [...]

  10. Gravatar

    iHao Press » wordpress 2.3????

    September 23rd, 2007 at 1:34 am

    10

    [...] ???????????2.3??????Tag (part 1) (part 2) [...]

  11. Gravatar

    iHao Press » wordpress 2.3????

    September 23rd, 2007 at 1:34 am

    11

    [...] ???????????2.3??????Tag (part 1) (part 2) [...]

  12. Gravatar

    Vix

    September 23rd, 2007 at 1:53 am

    12

    @Antonio: To display a tag title in it’s archive page you would use single_tag_title()

  13. Gravatar

    Lazy Sunday Resources | Butterfly Media Romania Blog

    September 23rd, 2007 at 7:32 am

    13
  14. Gravatar

    S.k

    September 23rd, 2007 at 12:41 pm

    14

    Should we not add “” and “” elements for the list to work, or have they been incorporated already in the coding?

    S.K

  15. Gravatar

    Casey

    September 25th, 2007 at 5:19 am

    15

    How can I add the tags in the new system to the meta keywords?

  16. Gravatar

    Make$ Money$ - Truth, no scam » Blog Archive » How to add tags to your Wordpress 2.3?

    September 25th, 2007 at 9:24 am

    16

    [...] How To Add Wordpress 2.3 Tags To Your Current Theme, Part 2 [...]

  17. Gravatar

    Matt Ellsworth

    September 25th, 2007 at 9:11 pm

    17

    thank you very very very much for this - it was a life saver!

  18. Gravatar

    WordPressCHINA - WordPress??? » Blog Archive » ???? WordPress 2.3 ?????????

    September 26th, 2007 at 12:12 am

    18

    [...] ??????? WordPress 2.3 ??????????????????????????? [...]

  19. Gravatar

    如何添加 WordPress 2.3 标签到你使用的主题 - 总而言之,统而言之

    September 26th, 2007 at 12:43 am

    19

    [...] 补充:如何添加 WordPress 2.3 标签到你的主题第二部分,回答了下面网友提出的一些问题。 [...]

  20. Gravatar

    I’ve Upgraded To WordPress 2.3 » Reformed Geek

    September 26th, 2007 at 3:47 am

    20

    [...] How To Add WordPress 2.3 Tags To Your Current Theme - Part 2 [...]

  21. Gravatar

    ??@TaTa360.COM » Blog Archive » ???? WordPress 2.3 ?????????

    September 26th, 2007 at 9:02 am

    21

    [...] ??????? WordPress 2.3 ??????????????????????????? [...]

  22. Gravatar

      How To Add Wordpress 2.3 Tags To Your Current Theme by Aiming for Independence

    September 26th, 2007 at 3:44 pm

    22

    [...] Using Wordpress 2.3 Tags pt 2 [...]

  23. Gravatar

    Daniel

    September 27th, 2007 at 9:42 pm

    23

    I couldn’t understand some parts of this article o.us poetry, but I guess I just need to check some more resources regarding this, because it sounds interesting.

  24. Gravatar

    Codicis

    September 28th, 2007 at 3:50 pm

    24

    Maybe i had different expectations from tags. Tags are Ok, don’t take me wrong, but i felt that the main target for tags was to fill this meta tag:

    I can do that by myself, now that i have the tags stored somewhere, but i feel there could be an API to do that, since tags are focused in SEO practices.

    Just to drop my comment, thanks for the enlightening on the subject.

  25. Gravatar

    WordPress 2.3 Incompatible Plugins and Additional Tips | taintedsong v9

    September 29th, 2007 at 3:29 pm

    25

    [...] After you’ve placed that one line within The Loop, you can then make use of the tag feature whenever you write a post. To learn more about adding and customizing your WordPress 2.3, go here and here. [...]

  26. Gravatar

    SoulSmasher | Septik Blog | PHP Fusion » Blog Arşivi » Wordpress 2.3 e güncelleme tamamland?

    September 29th, 2007 at 3:43 pm

    26

    [...] edenler için ?unu belirtmek isterim: burdaki ve burdaki dökümanlar sayesinde temay? 2.3 sürümüne uygun hale getirdim (taglar ve tag [...]

  27. Gravatar

    Kim

    October 1st, 2007 at 9:35 am

    27

    I am wondering something. Currently I use my tags to tag each of my quilting projects in my hobby blog. I am trying to make a page with current status and gallery photos. I would like to add a “related posts” to each project’s page. How can I specify to list each post with the specified tag? Hope that is as clear as mud..

  28. Gravatar

    Wordpress 2.3 and Live Writer Beta 3 released and working together

    October 4th, 2007 at 12:34 am

    28

    [...] How to add wordpres 2.3 tags to your current theme part 2 [...]

  29. Gravatar

    ???? WordPress 2.3 ????????? | ?????????

    October 6th, 2007 at 7:23 am

    29
  30. Gravatar

    n-blue

    October 12th, 2007 at 2:40 am

    30

    Thanks for great example how to use tag. I a bit comfuse with first post.

  31. Gravatar

    ???? WordPress 2.3 ????????? - ???? - WordPressCHINA - WordPress???

    October 13th, 2007 at 1:05 am

    31

    [...] How To Add Wordpress 2.3 Tags To Your Current Theme, Part 2 by [...]

  32. Gravatar

    Jenny Lens

    October 21st, 2007 at 7:37 pm

    32

    Rich rocks! I don’t know why I didn’t see part 2 in the first thread. I think I just kept scrolling and reading downward, and didn’t see the mention/links on the top. Thanks for the email re samples for complete code. I will wait for UTW to be updated.

    PS I am not seeing the Preview before I post this, and it’s cutting off words as I write this. Just so you know. It’s always something!

  33. Gravatar

    Upgrading WordPress 2.2 to 2.3 | Polymath Programmer

    October 29th, 2007 at 1:12 am

    33

    [...] turned out to be easier than I thought. Look at Technical Itch and Rich’s two part article for more information. Simply go to the WordPress control panel, select [Manage], then [Import], [...]

  34. Gravatar

    Neufeld Computer Services | Setting Up Tags in Wordpress 2.3

    November 11th, 2007 at 9:34 pm

    34

    [...] How To Add Wordpress 2.3 Tags To Your Current Theme, Part 2 [...]

  35. Gravatar

    Richard

    November 14th, 2007 at 5:10 am

    35

    It’s great. I googled “wordpress 2.3 tag” and find this site. It’s of great help. Thanks a lot.

  36. Gravatar

    Tags do WordPress 2.3 | Vomicae™

    November 19th, 2007 at 9:02 pm

    36

    [...] Template Tags Tags WordPress Tags WordPress Part2 Compartilhe com a Blogosfera ! These icons link to social bookmarking sites where readers can [...]

  37. Gravatar

    Ahmad

    December 5th, 2007 at 2:43 pm

    37

    Hi, Thnx. 4 those two articles. I’ve implemented the function within my blog’s theme. However, when I click on a tag it goes to an empty archive page that says it didn’t find any results for my search term!! How can I fix that?

  38. Gravatar

    ZevePheniek

    December 20th, 2007 at 10:28 am

    38

    I’d prefer reading in my native language, because my knowledge of your languange is no so well. But it was interesting! Look for some my links:

  39. Gravatar

    sara

    December 20th, 2007 at 10:31 am

    39

    Great site!”

  40. Gravatar

    Now Sporting Wordpress 2.3.2

    January 3rd, 2008 at 12:51 am

    40

    [...] - This is how to add tags to your Wordpress 2.3 theme. [...]

  41. Gravatar

    Elliott

    January 11th, 2008 at 2:21 pm

    41

    Thanks for solving this issue for me! I was pulling my hair out and you made it so simple!

  42. Gravatar

    ???? » ???? WordPress 2.3 ????????? - ????

    March 8th, 2008 at 9:49 am

    42

    [...] How To Add Wordpress 2.3 Tags To Your Current Theme, Part 2 by [...]


RSS feed for comments on this post · TrackBack URI

Leave a reply