If you’re using TagPiG to automate your post tagging you may also be using it’s publish feature to display the generated tags on your blog and feeds. It’s a very powerful feature but I’ll go into detail on that more in another post.
Today I wanted to mention one of the issues that can arise when you use the TagPiG publish feature. Increasingly WordPress theme designers are embedding tag code into their templates. If you then go and turn TagPiG publishing on you’ll end up with 2 sets of tags listed below each post.
To get things working correctly you’ll need to take the embedded tag code out of you template first and leave all the tag management to TagPiG. It’s a pretty easy job but you will need to edit a little code.
You can either edit your templates directly using notepad or even you FTP client but perhaps the easiest way is to use WordPress iteself to edit them in place on you blog.
In WordPress 2.7+ Admin area go to Appearance > Editor in the sidebar. Make sure your active theme is chosen in the dropdown box. You will probably see the following message at below the editor screen:
You need to make this file writable before you can save your changes.
The 2 files we need to focus on are index.php and single.php. Go into your FTP client and change the permissions on these files to 777 (CHMOD 777).
Now in the WordPress Editor select ‘Main Index Template (index.php)’ from the list on the right. If you don’t get a large blue update button below the edit window, something has gone wrong so go back and check the permissions on the two files in your FTP editor.
Scroll down through the file looking for the following code:
<?php the_tags( __( ‘Tagged’ ) . ‘: ‘, ‘, ‘, ”); ?>
It may not look exactly like this but it’s ‘the_tags’ you’re looking for really. Once you’ve found it remove everything between and including the nearest <? and ?> tags. Hit the ‘Update File’ button.
Repeast this process for the ‘Single Post (single.php)’ page and remove the_tags element. Don’t forget to the update the file.
Now go back into your FTP and reset the file permissions to 644.
That’s it, you’re done. You can use TagPiG as your only tag publisher, giving you much more control over how they appear and how many are displayed.