Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

facebook badge WordPress


On my homepage (, I would like to have a facebook like badge to pop up after the homepage loads.
I got the code, but I'm not sure where it needs to be placed in my template.

Does it go in my index page?

- <!-- Facebook Like Badge START --><div style="width: 100%;"><div style="
background: #3B5998;padding: 5px;"><img
src="" alt="Facebook"/><img
alt="" width="0" height="0"/></div><div style="background: #EDEFF4;display:
block;border-right: 1px solid #D8DFEA;border-bottom: 1px solid #D8DFEA;border-left:
1px solid #D8DFEA;margin: 0px;padding: 0px 0px 5px 0px;"><div style="background:
#EDEFF4;display: block;padding: 5px;"><table cellspacing="0" cellpadding="0" border="
0"><tr><td valign="top"><img
src="" alt=""/></td><td
valign="top"><p style="color: #808080;font-family: verdana;font-size: 11px;margin:
0px 0px 0px 0px;padding: 0px 8px 0px 8px;"><a
href="" target="_TOP" style="color: #3B5998;fontfamily:
verdana;font-size: 11px;font-weight: normal;margin: 0px;padding: 0px 0px 0px
0px;text-decoration: none;" title="Mandy Ebel">Mandy Ebel</a> likes</p></td></
tr></table></div><div style="background: #FFFFFF;clear: both;display: block;margin:
0px;overflow: hidden;padding: 5px;"><table cellspacing="0" cellpadding="0" border="
0"><tr><td valign="middle"><a href=""
target="_TOP" style="border: 0px;color: #3B5998;font-family: verdana;font-size:
12px;font-weight: bold;margin: 0px;padding: 0px;text-decoration: none;" title="Hawri
&amp;#039;n&amp;#039; Mandy"><img
rWk20O0bgXl4vs6hP96L6Z1k7Cu5awSFeDVrsc&size=square" style="border: 0px;margin:
0px;padding: 0px;" alt="Hawri &#039;n&#039; Mandy"/></a></td><td valign="middle"
style="padding: 0px 8px 0px 8px;"><a href=""
target="_TOP" style="border: 0px;color: #3B5998;font-family: verdana;font-size:
12px;font-weight: bold;margin: 0px;padding: 0px;text-decoration: none;" title="Hawri
&amp;#039;n&amp;#039; Mandy">Hawri &#039;n&#039; Mandy</a></td></tr></
table></div></div><div style="display: block;float: right;margin: 0px;padding: 4px 0px
0px 0px;"><a href="" target="_TOP" style="
color: #3B5998;font-family: verdana;font-size: 11px;font-weight: none;margin:
0px;padding: 0px;text-decoration: none;" title="Create your Like Badge">Create your
Like Badge</a></div></div><!-- Facebook Like Badge END -->

Answers (4)


Ryan Riatno answers:

You will need a jquery cookie and fancybox/lightbox to achieve that. Here's some [[LINK href=""]]tutorial[[/LINK]]

ddoodnath comments:

Thanks, I will take a look at this link

ddoodnath comments:

Maybe I added it wrong..but this is what happened.

Any ideas?

Ryan Riatno comments:

No, you need to download the plugins first and load it in your themes. Take a look at this [[LINK href=""]]tutorial[[/LINK]]

ddoodnath comments:

ok i will download them.

ddoodnath comments:

I downloaded them and made the folders in the tutorial, but something is off because its not working.


MDan answers:

Maybe these wordpress plugins will help too:

or this plugin which is more advanced:

Scroll down and pick the free version.


Just Me answers:

Don't you think it is a little odd to have people like or dislike your page after loading the index page? They haven't seen anything yet. They may find it annoying and click dislike.

ddoodnath comments:

lol a friend recently told me the same thing.

I have decided not to use it anymore.


Liesl Fawcett answers:

Placing it in the index template would work. What exactly do you mean by pop up?

ddoodnath comments:

When I say pop up, I mean after my homepage loads a window will pop up asking people to like my facebook page

Liesl Fawcett comments:

Ok, then I think you're missing something in your code, because it looks like that's just the Facebook badge. You could create a new file called fbbadge.php for example, paste the above code in it, and upload it to your theme folder. Then you could use this generator form this site to get a pop up window for it.

Liesl Fawcett comments:

Oops sorry wrong link. There is another generator I know of but I can't find the link for it right now. Looks like Ryan has a great solution though! Similar to what I was going for.

ddoodnath comments:

okay..I will take a look at his