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

facebook badge WordPress

  • SOLVED

On my homepage (http://www.hawriandmandy.com/), 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="http://www.facebook.com/images/fb_logo_small.png" alt="Facebook"/><img
src="http://badge.facebook.com/badge/169753929571.512333747.2136678001.png"
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="http://www.facebook.com/images/icons/fbpage.gif" 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="http://www.facebook.com/mandy.ebel" 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="http://www.facebook.com/HawrinMandy"
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
src="http://www.facebook.com/profile/pic.php?oid=AQDX9-h6hkTB7lLJQhIhAnYCsCdAO
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="http://www.facebook.com/HawrinMandy"
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="http://www.facebook.com/badges/like.php" 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)

2011-04-29

Ryan Riatno answers:

You will need a jquery cookie and fancybox/lightbox to achieve that. Here's some [[LINK href="http://stackoverflow.com/questions/5262837/jquery-modal-window-onload-with-fancybox-cookies"]]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.

http://www.hawriandmandy.com/

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="http://point47.com/journal/2010/06/modal-box-on-page-load-with-jquery-fancy-box-and-cookie-plugin/"]]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.

http://www.hawriandmandy.com/

2011-04-29

MDan answers:

Maybe these wordpress plugins will help too:
http://maketecheasier.com/wordpress-plugins/wordpress-popup-scheduler

or this plugin which is more advanced:
http://bigsellingoptins.com/optinpop-advanced-upgrade/

Scroll down and pick the free version.

2011-04-30

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.

2011-04-29

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. http://javascript.internet.com/generators/popup-window.html.


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