Here’s a useful tip for anyone who uses the wp-sphinnit plugin on a Wordpress blog that covers more than just SEO. Want to display the Sphinnit button on an SEO post but not on posts unrelated to SEO?
First of all, make sure you’ve set “align” to “none” in the Sphinnit options, or you’ll have two Sphinnit logos appear on every SEO post after implementing this code!

Next, you need to edit your single.php file and use a conditional tag before calling the wp-sphinnit plugin. You’ll need to insert the following code before “the_post”:

Category 4 is my SEO category – change the ‘4′ to the correct number for your own SEO category. That’s it!
To make things a bit more interesting, you might want the Digg button to appear in a certain category too. Try this:

In theory you could have a social media submit button for every category you blog in. Perhaps Stumbleupon is a more appropriate button to have than Digg on specific categories, and vice versa in other cases. Have fun!


(2 votes, average: 4.50 out of 5)







