Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages » Post-Kicker, -Byline & -Footer »

[SOLVED] Want to add ShareThis button only to single post pages


  #1  
Old Dec 9, 2010, 11:52 AM
LynnFang
 
5 posts · Dec 2010
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
  #2  
Old Dec 9, 2010, 12:24 PM
sriramraj
 
1 posts · Dec 2010
Gurgaon
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
  #3  
Old Dec 9, 2010, 02:05 PM
LynnFang
 
5 posts · Dec 2010
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.
  #4  
Old Dec 10, 2010, 11:36 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
try this
HTML Code:
<?php if (!is_home() and function_exists(’sharethis_button’)) { sharethis_button(); }?>
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Dec 14, 2010, 12:46 PM
LynnFang
 
5 posts · Dec 2010
Thank you! While that code did not work, this one did:

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

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do i add the add to cart button to a post or page? dilago eCommerce & Atahualpa 7 Oct 31, 2011 10:37 AM
Sharethis button automatically placed on top of entire blog Sidneyvollmer Plugins & Atahualpa 10 Sep 2, 2010 03:31 PM
How to add PHP to the loop on multi- and single post pages only? Fux Center area post/pages 2 Jun 16, 2010 05:55 AM
How do I add ShareThis at end of every post? kippiper Plugins & Atahualpa 3 Mar 13, 2010 10:52 AM
Post / Page Info Items - Button crashes comp, how do I add to post-footer? Image help everygirlssecret Post-Kicker, -Byline & -Footer 1 Jan 5, 2009 02:12 PM


All times are GMT -6. The time now is 11:46 AM.


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