ADVERTISEMENTS

Introducing WP Wednesdays: Tags

Here’s a new feature at DZNROKR - Wordpress Wednesdays! There’s a ton of great stuff about Wordpress than you may not know that can make running your site so much more efficient, especially when running fansites. Every Wednesday I’m going to write a different article about quick and easy customizations that you can make to get more out of Wordpress.

This week, I’m going to talk about why tagging is a great way to get more people to your site from search engines.

What’s the difference between tags and categories?

A lot. A category should be something that can easily cover a good amount of posts. A tag may only get used once (or 1000 times), but is a more relevent word or short phrase to the content of the post.

Example:

Category: Stephenie Meyer
Tags: Twilight, New Moon, Eclipse, Breaking Dawn, The Host

Granted, those tags can prove to be quite broad. This would also work:

Category: Hogwarts
Tags: prefects, quidditch, thestrals

Also, I should mention that tags do not rely on categories, meaning you could put prefects under Stephenie Meyer’s category (but why would you?).

Why use tags?

Tags are sort of like search engine sugar, an easy way to find your site from a range of keywords you might not use in your site meta. Also, why would you want to turn away amazing things that help your site like Technorati?

Tags also help the users on your site find content quicker via the use of tag clouds in your sidebar (or wherever). If they are looking for articles relating to a certain film, or album they can easily get to the archive for that tag, or even subscribe to it’s feed.

How to add tags to your theme

So if you’ve decided you want to take advantage of the tagging system in Wordpress, you may be wondering how to implement the tags into your theme.

First, let’s add the code to grab the tags to your post information. This is usually found in index.php, single.php, and archive.php. Open those, and find a spot in The Loop (they place where the title, date, and content are) and place this code:

<?php the_tags(); ?>

I usually place that along side my categories, or below the_content.

To add the tag cloud, open up sidebar.php, and add this code:

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

Smallest and largest indicate the font size depending on the number of posts linked to each tag.

Comment with any questions or comments below.

Comments are closed.

Copyright © DZNROKR Fansites. All Rights Reserved.
Home · About · Contact · Sitemap · Log in · Register