WordPress Blogs: Create Custom Tag Pages
A WordPress blog post is made up of a handful of elements like the title and content, but also tags, categories and comments. Tag pages usually display excerpts of all posts that use the same tag, and the same is true for category pages.
While you are not required to use tags at all, doing so may improve the accessibility of your blog posts as you can group posts using tags.
One example: If you search for Windows 7 Download on Google you find that a tag page for website Windows 7 News is ranking on the third page of the results. Tag pages on the other hand are usually not the pages that visitors expect when visiting a website. (note: no longer)
Custom Tag pages in WordPress
Webmasters can utilize tag pages better on their WordPress blogs by creating custom tag pages which may list any information they want. The benefit of this approach is that your tag pages become more unique, as they not only list posts, but also additional information that you add to these pages.
If you open the Amazon tag page here on Ghacks for example, you will notice that it offers a custom description and image at the top before the actual articles are listed on it.
WordPress provides the means to create those custom tag pages easily. Custom tag pages can be created in the theme directory of the WordPress directory by adding a new template file to the theme.
This new template file needs to begin with tag followed by the post slug of the tag. In the case of the amazon tag it would have to be named tag-amazon.php.
Custom tag pages have a higher priority than the default ones that show only excerpts of the posts. The easiest way to fill the custom tag with content is by making a copy of the tag.php file, rename that copy to tag-name.php, and fill it with custom data at the top.
WordPress looks for the following files in order to create those tag pages:
- tag-slug.php
- tag.php
- archive.php
- index.php
Look into your theme folder and see if there is a tag.php file. If it is copy its contents and create a new php file that is using the tag-slug.php as its name. If there is no tag.php look for archive.php and finally index.php.
Now simply add content to the file. It might take some experimentation at the beginning but it can be really worth it in the long run. If you have any questions or additions let me know in the comments.
Update: Some WordPress themes use tag descriptions automatically for this. If you fill out the description it may appear right above the tag even if you do not create custom tag pages. The Canvas theme that this site uses does so for example.
Perfect idea, Helpful, will try it later.
Great.. now looking for improve my tag.php
creating your own or tweaking the tag is really good for seo thanks for additional insights
thanks for this, Im going to edit may tag page to be more precise
my name is amit on my website i want to show all the tags on separate page post how to do that?
Amit this may help you http://wordpress.org/support/topic/how-to-display-all-tags-in-one-page
What I am looking to do is similar. I am looking to have a static page as well as the blog appear on the main page of my wordpress site. Right now going to the settings section will only allow me to do one or the other. any feedback would be appreciated. Is there a special PHP INCLUDE tag I should be using for both to appear?
Roch you can edit the index.php file manually to add static content to it. That’s how I have done it on the ghacks front.
i want plugin
Good! Good luck with results.
any pointers on how to seo a tag page to its fullest potential? I had my first natural search visitor to a blog i havent promoted yet. They found me through a tag page. i didnt even know it existed, dont have much backlinking experience;)
seems it could be pretty powerful if done correctly, and probably would only take a couple tweaks.
Good. Thanks :)http://www.emrearici.com
Google also monitors bounce rates, so if your tag pages don’t look relevant they will eventually lose their positions, so this is worth doing for any pages on a site that’s getting a lot of traffic.
I’m glad we added some custom tag pages on Windows 7 and I’m going to check the stats on all my sites to see if I should create more.
BTW I saw this post on twitter so it really does help promote posts!