Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Post-Kicker, -Byline & -Footer (http://forum.bytesforall.com/forumdisplay.php?f=17)
-   -   [SOLVED] Want to add ShareThis button only to single post pages (http://forum.bytesforall.com/showthread.php?t=11628)

LynnFang Dec 9, 2010 10:52 AM

[SOLVED] Want to add ShareThis button only to single post pages
 
I want to add this piece of code:

<?php if (function_exists(’sharethis_button’)) { sharethis_button(); }?>

to single post pages, above the footer. My site is here, and currently I have placed this code in The Loop, right above the footer.

I don't want it to show up on the Home page. I tried adding some php code to specify only to show on single post pages, but I'm a php noob, so it didn't work. How can I hide it from the home page???

P.S. I donated :)

sriramraj Dec 9, 2010 11:24 AM

Instead of using share this button, use sexy book marks plugin or addtoany plugin for wordpress. I have placed it in my site pro article base.

If you want to see sexy book marks plugin you can see Money Trials

LynnFang Dec 9, 2010 01:05 PM

Thank you for your suggestion. I have tried both of those plugins, and I don't like them. I prefer to use the ShareThis button.

juggledad Dec 10, 2010 10:36 AM

try this
HTML Code:

<?php if (!is_home() and function_exists(’sharethis_button’)) { sharethis_button(); }?>

LynnFang Dec 14, 2010 11:46 AM

Thank you! While that code did not work, this one did:

Code:

<?php if (!is_home() || function_exists(’sharethis_button’)) { sharethis_button(); }?>


All times are GMT -6. The time now is 05:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.