How To Create Unique Content On Every WordPress Tag And Category Page.
In my last post I described a solution to the duplicate content problem. This post follows up on the idea of solving the duplicate content problem by providing valuable unique content on your tag and category pages. This way, instead of excluding those pages from being listed in the search engines, you can add even more valuable content to your blog, on theme focused pages
Warning Real Work Ahead. This May Not Be For You.
Right up front, let me say that if you aren't willing to invest some time and effort into your blog posts, if you are looking for push button solutions, if you are looking for the easy automated path to success, this post is going to greatly disappoint you. What I'm about to describe is not even a little bit automated. I can't even think of a reasonable way that it could be automated. It means putting in the effort to take a couple extra minutes with each post and create from a couple to several whole new descriptions and titles for each post you add to your blog. I honestly don't expect more than five or ten percent of people who seriously read and consider this method to even try it, let alone adopt it.
That's actually great news for those few who do take the time. The benefits are great, and there is no simple way for the rest to automate and duplicate it, so you will gain and keep a true advantage over the vast majority of other bloggers out there.
The Problem With WordPress Out Of The Box
It's not really a problem with WordPress, since the theme architecture of the software itself is what actually makes it possible for us to do this. The real problem is in the approach that most bloggers and theme designers take to tag and category pages. In the worst cases they just display these valuable semantic keyword pages with the index.php template and you end up with several posts displayed in full text views, completely duplicating several of the single post view pages on every tag and category view. This can be somewhat mitigated by using the <!--more--> tag which will suppress the remainder of the post on page views other than the single post page.
At best many themes will include tag.php and category.php templates that explicitly make use of the post excerpt instead of the full post. But this means that the excerpt is being displayed on a number of pages depending on how many categories and how many tags you have placed the post in. This definitely is not ideal from an SEO
Why Unique Content Tag And Category Pages Are Better For Everyone.
Displaying Unique Titles And Descriptions on Tag And Category Pages is better for all involved. For the Search Engines, this will generate more pages they can use in their indexes and provide them with more clues to the semantic relationship of content on your blog. For the readers, more opportunities to find your single post pages with valuable content are presented across a wider semantically connected selection of possible search terms. And for you, the blogger, it means more traffic, more readers and more potential for conversion to actions. Ahh, the sweet smell of blog success. :)
The Unique Tag And Category Page Process
The process involved to make this work utilizes the Get Custom Field Values plugin
So if the post were filed in the category "optimization" you would have the fields "optimization t" and "optimization d". Then you would do the same for each tag name. Here is a screen shot of the custom fields from my last post that illustrates this step. Each of these custom fields is either a tag title or a tag description.

The Code That Makes It Work
In your tag.php template, you need to locate the section of the code that displays the title and post or the title and excerpt and replace it with this code.
[php]
< ?php $tagv = single_tag_title( '', false ); //tag name
if (c2c_get_custom($tagv. ' d')) : //tag extra field value
$tagt = c2c_get_custom($tagv . ' t'); //tag title
$tagd = c2c_get_custom($tagv . ' d'); //tag description
elseif (c2c_get_custom('tag d')) :
$tagt = c2c_get_custom('tag t'); //default tag title
$tagd = c2c_get_custom('tag d'); //default tag description
else :
echo 'no tag value passed';
$tagt = NULL; //Or just use the title
$tagd = NULL; //Or just use the excerpt
endif;
?>
< ?php if($tagt) :
echo $tagt;
else :
the_title();
endif;
?>
< ?php if($tagd) :
echo $tagd;
else :
the_excerpt();
endif;
?>
[/php]
for the category.php template you'll want to use this code.
[php]
< ?php $catv = single_cat_title( '', false ); //tag name
if (c2c_get_custom($catv. ' d')) : //tag extra field value
$catt = c2c_get_custom($catv . ' t'); //tag title
$catd = c2c_get_custom($catv . ' d'); //tag description
elseif (c2c_get_custom('tag d')) :
$catt = c2c_get_custom('cat t'); //default tag title
$catd = c2c_get_custom('cat d'); //default tag description
else :
echo 'no tag value passed';
$catt = NULL; //Or just use the title
$catd = NULL; //Or just use the excerpt
endif;
?>
< ?php if($catt) :
echo $catt;
else :
the_title();
endif;
?>
< ?php if($catd) :
echo $catd;
else :
the_excerpt();
endif;
?>
[/php]
In both cases the code will check to see if there is a custom field for the current tag or category with a " t" for the title and a " d" for the description. If there is it will use that value. If not it checks to see if there is a generic "tag t" and "tag d" for the tag page and "cat t" and "cat d" for category pages and displays that. If neither exist is will display the regular post title and the post excerpt. So if you forget to include a title or description it will degrade gracefully and not break your blog.
You can test this out with this post. Just click on one of the tags and check out the listing for this post. Then come back and click on another tag and you will see a different title and description. Same if you click through to the category view. On the front page I'm using the_content(), but the use of the <!--more--> tag means that only the first paragraph of the post is actually displayed. On my category page I'm actually displaying the excerpt instead of an additional category description, and I also use the excerpt as a meta description tag.
Usually I explain the code line by line, but this post is already pretty long, so I've foregone that. If you need me to add in a line by line explanation, leave a comment and I'll add it in for you.
I also want to mention that I do custom theme designs for reasonable rates that include lots of little extra goodies like this if you want them. hit me up on my contact form if you are interested in having a custom theme done.
Trackback URL for this post:
Bookmark & Share: Click, Copy and Link:








WordPress Uniquefier Plugin
This plugin is great as it will eliminate all the dupe content pages created by WordPress.
Btw, you may want to check http://Uniquefier.com to eliminate the dupe content from the articles too.
How about some demos?
I'd like to see a handful of blogs running this stuff. Can you email me some links? gyrocy -[at]- gmail -[.]- com
Hi, You can see the DP sale
Hi,
You can see the DP sale thread and the reviews here:
http://forums.digitalpoint.com/showthread.php?t=1000918
@Michael I haven't upgraded
@Michael
I haven't upgraded to 2.6 yet. I may actually be converting to Drupal. But nothing I can think of in the code should preclude it from working with 2.6 unless they changed the way they handle the extra fields, and as far as I know they did not.
This looks like a great
This looks like a great solution, though it may take quite a bit of time to get the work done on it.
Will all of the code examples still work with the latest 2.6 WP release?
Awesome work, Dane!
Michael
http://www.halfhourworkweek.com
"Do what you love and live your dreams"
This seems like sooooo much
This seems like sooooo much work when there is a much, much easier way to do this. All you have to is create a tag template for tag pages and a category template for category pages. You just do this once for each tag and category, not every time you write a post.
This way, as well - you can change the layout of any page if you wish, or add specific ads per tags/categories, it's easier and much more flexible than the code type hack above.
[...] Fresh | Internet
[...] Fresh | Internet Marketing Badger Giving Back to the WordPress Community
I was just going to download
I was just going to download this, but realised my theme is changed. I would have to put this in single.php in my themes folder, but what wordpress code would I need to show the tags and category info at the bottom?
Thanks
Thank you for good info,
Thank you for good info, I'll give a try.
BTW, that Amber Alert Ticker in the right upper corner disturbs scrolling of your page in latest Firefox on Ubuntu. Possible on Windows too. Thanks for that also: I added it to AdBlock Plus blacklist :)
Oh, thanks so much! Before
Oh, thanks so much! Before reading it, I always think creating unique content is hard. After reading it, I found it's a easy job.
I don't know that's a lot to
I don't know that's a lot to do for a post. Especially if you're not THAT into making it work. Like me. xD
really does sound like a lot
really does sound like a lot of work.
I didn't understand the t and d differences.
While interesting for sure,
While interesting for sure, it seems like too much work for me, at least not worth the results you are getting. There are more rewarding ways to spend your precious time IMHO...
[...] Dane Morgan has
[...] Dane Morgan has written a beautiful article entitled How To Create Unique Content On Every WordPress Tag And Category Page, it’s a definite must read for those who are concerned about SEO, in fact even if your not to [...]
Hey Stephen, Good point out
Hey Stephen,
Good point out there. Actually this all works with the more tag! ;) I use the more tag as well, and thats what drives the front page on my blog.
Dane, that's a really neat
Dane,
that's a really neat solution. Personally I won't adopt it (too much work for me! and I use the more tag), but I really admire it. Well done. I'll keep it in mind when I hear people who want a real solution to this..
[...] Dane Morgan has
[...] Dane Morgan has written a beautiful article entitled How To Create Unique Content On Every WordPress Tag And Category Page, it’s a definite must read for those who are concerned about SEO, in fact even if your not to [...]
Hi Dewald, Thanks for
Hi Dewald, Thanks for stopping by.
Yeah, my approach definitely isn't intended for folks looking for the push button solution. I am more interested in the higher quality approaches on this blog. I do deploy a lot of automation in many of my niche blogs, but this is where I blog about high touch, high feel blogs that you actually craft as opposed to push.
I did notice some buzz about your plugin, and it's on my list to play with at some point. I'm also talking to a coder about a solution that can let you create some specific rules regarding targeted words and phrases and then run a spin from a limited user defined thesaurus to "auto generate" tag and category description text. Not sure it's really even feasible, but I'm exploring it.
[...] possible use local tag
[...] possible use local tag pages and consider setting up unique tag based titles and descriptions for each post for each tag you assign to the [...]
Dane, It's an interesting
Dane,
It's an interesting approach you've taken to fighting duplicate content. I'm still looking for the solution that doesn't require work. Even my WordPress plugin, WP Spinner, which takes a different approach, also requires work in the sense that one has to define alternate content versions when you write the content. The plugin then uses the alternate versions to make each page view of the content unique, meaning Google never finds exactly the same text when it visits a particular post or page. My rationale was, if the text of a post differs when it's displayed in the single post view and the category archive view, for example, then there can't be a duplicate content issue between the two views. Another day, another approach. :)
[...] “Right up front, let
[...] “Right up front, let me say that if you aren’t willing to invest some time and effort into your blog posts, if you are looking for push button solutions, if you are looking for the easy automated path to success, this post is going to greatly disappoint you. […] It means putting in the effort to take a couple extra minutes with each post and create from a couple to several whole new descriptions and titles for each post you add to your blog. I honestly don’t expect more than five or ten percent of people who seriously read and consider this method to even try it, let alone adopt it. “How To Create Unique Content On Every WordPress Tag And Category Page“ [...]
[...] Dane Morgan has
[...] Dane Morgan has written a beautiful article entitled How To Create Unique Content On Every WordPress Tag And Category Page, it’s a definite must read for those who are concerned about SEO, in fact even if your not to [...]
[...] I need to grab a
[...] I need to grab a couple screen shots and format some code for you first though. Here’s the How To Use Custom Unique Titles And Descriptions [...]
Post new comment