Jump to content
Sign in to follow this  
nfardo

Major Error with search results landing page

Recommended Posts

nfardo
http://pghfirm.powweb.com/?s=news&x=0&y=0 It adds all of the FB Like and Twitter Tweet options to each individual result. I've edited _post.php in the Appearance Editor area, am I doing something wrong, or does this need segmented somehow? Thanks, NPF

Share this post


Link to post
Share on other sites
cmunns

If you want them to only show on the single post pages then the sure fire way is to add this around you FB and twitter code ` <?php if(is_single):?> YOUR TWITTER/FB CODE <?php endif;?> `

Share this post


Link to post
Share on other sites
nfardo

Interesting, let me try that out, thanks :)

Share this post


Link to post
Share on other sites
nfardo

I added it here and here <?php if(is_single):?> <iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&layout=standard&show_faces=false&width=450&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:300px; height:24px;"></iframe><?php endif;?> <?php if(is_single):?>Tweet<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script><?php endif;?> Doesn't seem to be working here: http://pghfirm.powweb.com/?s=appeal&x=0&y=0

Share this post


Link to post
Share on other sites
bryan-hadaway

Another trick could be to give that iframe a class, let's say: `class="socialz"` And then in your Custom CSS you could add: ` .socialz{display:none} .single .socialz{display:inline} ` Thanks, Bryan

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×