[SOLVED] ADD This only on Single Posts
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! |
surround it with an
HTML Code:
<?php if (is_single() { |
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! |
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?? |
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 |
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
|
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 } ?> |
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
|
Hi Juggledad,
That's my problem. This code I shared doesn't work. :( |
On second thought, it now works!
|
Thanks Juggledad!
|
the if has an error it should be
HTML Code:
if (is_single()) { ?> |
Yeah I figured that out! Thanks so much for you help Juggledad!
|
All times are GMT -6. The time now is 11:30 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.