Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Excerpts, Read more, Pagination (http://forum.bytesforall.com/forumdisplay.php?f=20)
-   -   How to add facebook like button after read more (http://forum.bytesforall.com/showthread.php?t=12905)

ragdoll Feb 20, 2011 02:14 PM

How to add facebook like button after read more
 
I'd like to add a facebook like button at the end of my excerpt, right after the read more text.
I would like to have it there, so it doesn't go below the post image, which is what happens if I put it in the footer.
I'm using the iframe code, since I want to limit the number of plugins. I tried to paste the iframe code at the end of the custom read more code, but I get a strange behavior.
Where should I put this code?

juggledad Feb 21, 2011 05:59 AM

why are you using an iframe?
What is the code?
try wrapping the code in a div like
HTML Code:

[...]<div class="facebook-thing"> hello </div>

ragdoll Feb 25, 2011 03:17 AM

Quote:

Originally Posted by juggledad (Post 58566)
why are you using an iframe?
What is the code?
try wrapping the code in a div like
HTML Code:

[...]<div class="facebook-thing"> hello </div>

This is the code I'm using
Code:

<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&amp;layout=standard&amp;show_faces=false&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:25px;"></iframe>
Is it correct to add it to the custom read more field?
If I used your suggestion I should create a custom style for the facebook like button, right?

juggledad Feb 25, 2011 03:58 AM

Did you try it?

ragdoll Feb 26, 2011 04:38 AM

1 Attachment(s)
I already tried to enclose the iframe in a div and I got the same result as when not enclosing.
I only wanted to know that the style attribute would have changed. I added it but nothing changed.
Attached you will find a screen capture of what I'm getting.
As you can see the code isn't working. The post is not liked by 4665 people.

juggledad Feb 27, 2011 03:52 AM

It looks like an issue with the iframe code. Why not use a plugin?

ragdoll Feb 28, 2011 02:44 AM

I'm trying to limit the number of installed plugins. Moreover, many plugins don't offer enough customization options. Also, if I use the code it is saved in Atahualpa options and it could be easily recovered.


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

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