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 » Forum Usage » Forum How-To »

[SOLVED] ADD This only on Single Posts


  #1  
Old May 28, 2010, 05:24 AM
Jurgen Estanislao
 
76 posts · May 2010
Hi Flynn, JuggleDad, Guys!

I now know how to embed sharing functionalities on my blog. However, how do I indicate it on the LOOP that it should only come out on post/article pages?

Thanks!
  #2  
Old May 28, 2010, 05:38 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
surround it with an
HTML Code:
<?php if (is_single() {
...other code goes here
} ?>
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old May 28, 2010, 11:35 AM
Jurgen Estanislao
 
76 posts · May 2010
Hi Juggledad! and Larry!

Thanks for your tips, I've tried both but they didn't work.

For my sharing functions here's my code:

--
<br/>
<br/>
<i>Sharing is Caring!</i>
<br/>
<br/>
<div class="addthis_toolbox addthis_default_style">
<a class="addthis_button_googlebuzz"><img src="http://www.seotaoist.com/wp-content/uploads/2010/05/Google-Buzz.png/" alt="Google Buzz" title="Buzz This!"/></a>
<a class="addthis_button_facebook"><img src="http://www.seotaoist.com/wp-content/uploads/2010/05/Facebook.png/" alt="Facebook" title="Share This!"/></a>
<a class="addthis_button_twitter"><img src="http://www.seotaoist.com/wp-content/uploads/2010/05/Twitter.png/" alt="Twitter" title="Tweet This!"/></a>
<a class="addthis_button_digg"><img src="http://www.seotaoist.com/wp-content/uploads/2010/05/Digg.png/" alt="Digg" title="Digg This!"/></a>
<a class="addthis_button_delicious"><img src="http://www.seotaoist.com/wp-content/uploads/2010/05/Delicious.png/" alt="Delicious" title="Send to Delicious!"/></a>
<a class="addthis_button_stumbleupon"><img src="http://www.seotaoist.com/wp-content/uploads/2010/05/stumbleupon.png/" alt="StumbleUpon" title="Send to StumbleUpon!"/></a>
<a class="addthis_button_reddit"><img src="http://www.seotaoist.com/wp-content/uploads/2010/05/Reddit.png/" alt="Reddit" title="Send to Reddit!"/></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=jurgenestanislao"></script>
<br/>
<br/>

For Disqus, not sure particularly where to edit this.

Thanks for your support guys!
  #4  
Old May 28, 2010, 01:24 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
I broke this into two threads to keep things clean
the descus thread is http://forum.bytesforall.com/showthread.php?t=7323

Where are you putting all this share this code? In your initial post you said the LOOP so I assume (forgive me for that) that you ment in the ato->Style & edit CENTER COLUMN->the LOOP - is that correct or do you put is somewhere else??
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old May 28, 2010, 09:33 PM
Jurgen Estanislao
 
76 posts · May 2010
Hi JuggleDad,

Yes, you're right. I placed this code on ATO > Style Center Column > The Loop.

In any case, is that the right section to place such code? Problem is the buttons display on all pages. I'm just interested to display the share functions on single blog/article pages.

Thanks
  #6  
Old May 28, 2010, 09:52 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Did you put the code I showed exactly, because it wouldn't work as is, it would only work if you were using php code. Your sample shows HTML code so you would need a ' ?>' at the end of the first line of code I gave and a '<?php ' at the beginning of the last line I gave you
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #7  
Old May 28, 2010, 10:21 PM
Jurgen Estanislao
 
76 posts · May 2010
Hi Juggledad!

Sorry that I'm not that great with coding.

In any case, is this correct?

<?php /* For ADD THIS share functionalities on single posts */
if (is_single() { ?>
--
<br/>
<br/>
<i>Sharing is Caring!</i>
<br/>
<br/>
<div class="addthis_toolbox addthis_default_style">
<a class="addthis_button_googlebuzz"><img src="http://www.seotaoist.com/wp-content/uploads/2010/05/Google-Buzz.png/" alt="Google Buzz" title="Buzz This!"/></a>
<a class="addthis_button_facebook"><img src="http://www.seotaoist.com/wp-content/uploads/2010/05/Facebook.png/" alt="Facebook" title="Share This!"/></a>
<a class="addthis_button_twitter"><img src="http://www.seotaoist.com/wp-content/uploads/2010/05/Twitter.png/" alt="Twitter" title="Tweet This!"/></a>
<a class="addthis_button_digg"><img src="http://www.seotaoist.com/wp-content/uploads/2010/05/Digg.png/" alt="Digg" title="Digg This!"/></a>
<a class="addthis_button_delicious"><img src="http://www.seotaoist.com/wp-content/uploads/2010/05/Delicious.png/" alt="Delicious" title="Send to Delicious!"/></a>
<a class="addthis_button_stumbleupon"><img src="http://www.seotaoist.com/wp-content/uploads/2010/05/stumbleupon.png/" alt="StumbleUpon" title="Send to StumbleUpon!"/></a>
<a class="addthis_button_reddit"><img src="http://www.seotaoist.com/wp-content/uploads/2010/05/Reddit.png/" alt="Reddit" title="Send to Reddit!"/></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=jurgenestanislao"></script>
<br/>
<br/>
<?php } ?>
  #8  
Old May 29, 2010, 07:00 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
That looks good, just get rid of teh line with the two dashes after the if statement or they will show up on the page
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #9  
Old May 29, 2010, 08:26 AM
Jurgen Estanislao
 
76 posts · May 2010
Hi Juggledad,

That's my problem. This code I shared doesn't work.

  #10  
Old May 29, 2010, 08:52 AM
Jurgen Estanislao
 
76 posts · May 2010
On second thought, it now works!
  #11  
Old May 29, 2010, 09:03 AM
Jurgen Estanislao
 
76 posts · May 2010
Thanks Juggledad!
  #12  
Old May 29, 2010, 09:59 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
the if has an error it should be
HTML Code:
if (is_single()) { ?>
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #13  
Old May 29, 2010, 10:17 AM
Jurgen Estanislao
 
76 posts · May 2010
Yeah I figured that out! Thanks so much for you help Juggledad!

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to have custom sidebar content for single posts? Chloe Sidebars & Widgets 3 Apr 30, 2010 03:37 PM
How to add php code to a 'single' page JakeThePeg Center area post/pages 8 Mar 21, 2010 01:21 AM
How to avoid comments appear open in single posts? ahc Comments, trackbacks & pings 2 Dec 29, 2009 06:48 PM
Video Embeding problem in Single Posts Fjiorea Atahualpa 3 Wordpress theme 4 Feb 19, 2009 08:06 PM
[SOLVED] How To Add Codes since we have no access to Single Post? sns Atahualpa 3 Wordpress theme 3 Feb 10, 2009 10:35 AM


All times are GMT -6. The time now is 09:39 PM.


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