Upgrading your theme for Wordpress 2.3

Since I upgraded to Wordpress 2.3 a few days ago, I’ve been wanting to make this theme fully compatible to the latest version by adding support for tags too. I’m lucky to be using the Copyblogger theme, since its compatible with WP 2.3 out of the box, except for tags support - you would want to check if your theme is compatible with WP 2.3 if you have not yet upgraded.

Its a fairly simple process to update your theme and requires the addition of only a single line of PHP code, Wordpress couldn’t have made it easier although I have to admit I had considerable help from Rich. Here are step-by-step instructions on how to do it:

  1. Open /wp-content/themes/YOUR_THEME_ NAME/index.php
  2. If you would like to display the tags immediately after the post,

    Add

    <?php the_tags(‘before’, ’separator’, ‘after’); ?>

    After

    <?php the_content(”Continue Reading…”); ?>

  3. Replace the words “before”, “separator” and “after” appropriately. For example, my code to display the tags that you see below this post is

    <?php the_tags(‘Read similar posts on ’, ’,’, ‘.’); ?>

    Essentially, it means that the tags are preceded by the words “Read similar posts on”, separated by a comma and succeeded by a period.

  4. Open /wp-content/themes/YOUR_THEME_ NAME/single.php
  5. Repeat steps 2 and 3, and relax.

Adding a tag cloud is all the more simpler if your theme is widgetized, a widget aptly called Tag Cloud will be waiting for you in your ACP. Just add it like you normally would add a widget and you are good to go.

Do note that you need to have added tags for them to be displayed, you can test it by making a new post or editing an existing post and adding tags to them. Over time though, managing your tags could get rather cumbersome, that’s why Christine (of Ultimate Tag Warrior fame) has come up with a new plugin called the Tag Managing Thing. Quoting her, this plugin will allow you to

  • Change the name and slug of the term
  • Delete a term
  • Split a term into multiple terms
  • Merge other terms into the selected term
  • Change a term to belong in a different taxonomy

That pretty much covers everything I’ll want to do with tags, for now at least.

Now comes the big question - should you use them at all? It depends.

On the plus side, tags are a boon to increase the number of pages in your blog. Since each tag gets its own page, if you have 100 posts in your blog and you were to tag each of that post with a different tag, you’d end up generating 100 new pages. Realistically though, the 100 posts may be tagged by, say 15-20 tags. Still, they would be generating as many pages. And search engines love more pages - they simply can’t have enough of them. So you will get indexed more, which in turn will give you more of a search engine presence, which eventually means more readers. Now, we all want readers, don’t we?

Then why did I say that using tags may not be ideal? Simply because the use of it depends on two things,

  1. whether your theme displays excerpts rather than the entire post on Category and Archive pages.
  2. if it doesn’t, it depends on whether you use the All-in-One-SEO-Pack to set the meta tags of the Category, Archive and Tag pages to “noindex, follow”

This will help you avoid the Duplicate Content Penalty which will otherwise affect you since your Category/ Archive/ Tag pages would just be a copy of your individual post page. Without adding tags, you would be having 6 copies of the same post, with the tagging feature, search engines will probably index countless copies of the same content - which is why using either step 1 or 2 is vital. Personally, I follow step 1 and set my Category/ Archive/ Tag pages to display only the post excerpts for the simple fact that I stated above - search engines love more pages. If you set them to “noindex, follow”, those pages will not be indexed and only the links on the pages will be followed, thus depriving you of an additional page - and tags introduce many more pages than Category and Archive pages ever will, which is why you would want those pages to count.

If you have any conflicting opinions, feel free to let me know about them in the comments.

Read similar posts on , , .

25 comments ↓

#1 Weekly Links - 10/13/07 << Vandelay Website Design on 10.13.07 at 9:46 am

[...] Upgrading Your Theme for WordPress 2.3 from I am Karthik. [...]

#2 Sumesh on 10.13.07 at 1:17 pm

Nice tut, mate.

Too bad, I went through all this stuff on wordpress.org, like this one :( :
http://codex.wordpress.org/Tem plate_Tags/the_tags

#3 Karthik on 10.13.07 at 2:59 pm

Thanks for the heads up on that, I hadn’t come across that earlier - to be honest, it looks like a more elaborate article than mine, but too much information sometimes confuses people ;)

#4 44 Internet Marketing Articles That Everyone Should Read: Internet Marketers Group Writing Project | Internet Marketing | Make Money Online | Strategy | Services on 10.17.07 at 8:45 pm

[...] Upgrading Your Theme For WordPress 2.3 by Karthik at IAmKarthik.com [...]

#5 Fortnightly Link Train on 10.19.07 at 1:40 am

[...] it to look. This is particularly so when you try to publish a step-by-step tutorial such as mine on how to upgrade your theme to be compatible with Wordpress 2.3. Believe it or not, the toughest part in writing the tutorial was to get the alignment right! (I do [...]

#6 Backlinks Giveaway: 28 Free Backlinks on 10.22.07 at 5:12 pm

[...] Upgrading your theme for Wordpress 2.3 [...]

#7 Internet Marketing Articles Writing, Motivation, Business Coaching, Design - Center of Muse — Helping Freelancers, Entrepreneurs Start-Up Small, Home, Businesses Based on Passion. on 10.22.07 at 11:54 pm

[...] Upgrading Your Theme For WordPress 2.3 by Karthik at IAmKarthik.com [...]

#8 Group Writing Project - The Entries | TheWritersManifestoBlog on 10.23.07 at 5:41 am

[...] of Sexual Chile Abuse Rishi: Tips to Get Best Out of Product Related Ad Networks Karthik: Upgrading Your Theme to Wordpress 2.3 Aseem Kishore: How to Find Good Ideas and Content for Your Blog Kyle Eslick: How to Ad Edit Buttons [...]

#9 A Huge List of Article Gems | FabNet Revenue on 10.23.07 at 5:52 am

[...] With Your Blog Visitors? by Pearl The One Thing To Know When Writing With Keywords by Simonne Upgrading Your Theme For WordPress 2.3 by [...]

#10 pelf on 10.23.07 at 9:41 am

I have a question:

Let’s say, I add the PHP code into my index.php and single.php, and I tag all my new posts with tags. Now, my question is, does that mean that only my new posts (that I have tagged with keywords) will be called out whenever I click on certain keywords? Does that mean that all my previous posts (that weren’t tagged) won’t be called out?

OK, have I confused you? LOL.

#11 Karthik on 10.23.07 at 11:32 am

No, you haven’t confused me…yet ;)

Breaking your question down to a simple one, are you trying to ask if “Will clicking on tags call up older posts that weren’t tagged, although they are of the same topic?”

The answer would be no - tags are only applicable to posts that you’ve marked. If your older posts didn’t have tags (in case you didn’t use a tags plugin earlier), they will be called only if you edit the post and add the tags.

Hope I was clear - and thanks for pointing out something that I hadn’t clarified in the post itself!

#12 pelf on 10.23.07 at 7:59 pm

You are so so smart! Yes, that was what I wanted to know, thank you! If that’s the case, I won’t be using tags since I have over 500 untagged posts, and it would be too much of a hassle to tag them all!

#13 Karthik on 10.23.07 at 8:28 pm

That shouldn’t be a problem, you can use them; starting now. So all future posts will have tags, just that the older posts will only be accessible the way you access them now. (via Categories or Archives)

I’m sure you will be posting a lot more than 500 posts in the future, so I would still recommend adopting tags, they do a world of SEO good IMO.

And, thanks for the compliments! ;)

#14 Top Tutorials From the Tutorials Group Writing Project on 10.25.07 at 1:18 pm

[...] Karthik: Upgrading Your Theme to Wordpress 2.3 [...]

#15 Who can’t use a couple of tutorials? on 10.27.07 at 7:47 pm

[...] of Sexual Chile Abuse Rishi: Tips to Get Best Out of Product Related Ad Networks Karthik: Upgrading Your Theme to Wordpress 2.3 Aseem Kishore: How to Find Good Ideas and Content for Your Blog Adam: Adding a Blog to Flickr [...]

#16 Favourite WritersManifesto group writing project entries on 10.27.07 at 9:18 pm

[...] Upgrading your theme to WP2.3 by Karthik. [...]

#17 Blogging Made Devilishly Simple. » Blog Archive » Courtney Tuttle’s Group Writing Project - the list on 10.28.07 at 9:13 pm

[...] Upgrading Your Theme For WordPress 2.3 by Karthik [...]

#18 digitalkeyto.info » Internet Marketers Group Writing Project | Internet Marketing | Make Money Online | Strategy | Services on 10.28.07 at 11:26 pm

[...] Upgrading Your Theme For WordPress 2.3 by Karthik at IAmKarthik.com [...]

#19 Monika @ The Writers Manifesto on 10.29.07 at 10:51 am

Hi Karthik,

Finally I’ve had some time to get all the votes collected. Great tutorial from you. Stumbled and Propellered. :-)

Monika

#20 Karthik on 10.29.07 at 3:31 pm

@Monika
I see you’ve been busy going around ;)
Glad you like the post - and thanks for the stumble!

#21   CourtneyTuttle.com Internet Marketers Group Writing Project by Internet Marketing Mind on 10.29.07 at 8:43 pm

[...] Upgrading Your Theme For WordPress 2.3 by Karthik at IAmKarthik.com [...]

#22 Blogging Tutorial Group Writing Project - My Online World on 10.30.07 at 6:20 pm

[...] read. Rishi gives some Tips to Get Best Out of Product Related Ad Networks. Karthik writes about Upgrading Your Theme to Wordpress 2.3 to be able to use tags for posts. Karthik also does a brief sell for using tags. The main benefit [...]

#23 Chris Raine on 01.23.08 at 8:03 pm

Hi

I found this a very well thought out article and you should be congratulated for its content and its information is very informative and helpful to many.

Thanks for your assistance!

Chris

#24 Yopoi on 03.21.08 at 1:46 am

Thank you for this tutorial. It’s really help me upgrading my wordpress blog.

#25 44 Internet Marketing Articles That Everyone Should Read: Internet Marketers Group Writing Project | Online SEO Blog on 06.21.08 at 4:57 am

[...] Upgrading Your Theme For WordPress 2.3 by Karthik at IAmKarthik.com [...]

Leave a Comment