WordPress.org

Ready to get started?Download WordPress

Forums

Facebook like button in HEADER (3 posts)

  1. arthurowordpress
    Member
    Posted 2 years ago #

    Hi there, I have searched on entire forum but didn`t get any results anyway ... I want to introduce the facebook like button in my head Home page.. or outside the sidebar greed up right ... how can I do that?
    Big thanks in advance :)

  2. Jackson
    Member
    Posted 2 years ago #

    You can generate the code you need here:

    http://developers.facebook.com/docs/reference/plugins/like/

    Use the iframe version, it will be easier to add.

    Depending on the structure of your theme, you'll need to insert this code in header.php, as well as adjust the styling if required to get it positioned and looking correct.

    If you only want the button to appear on the home page, you'll need to wrap it in a conditional,

    <?php
    if( is_home() ) { ?>
    <iframe src="http://www.facebook.com/plugins/like.php?app_id=101868206585294&href=http%3A%2F%2Fdomain.com&send=false&layout=standard&width=450&show_faces=false&action=like&colorscheme=light&font&height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe>
    <?php } ?>
  3. arthurowordpress
    Member
    Posted 2 years ago #

    Big thanks :D apreciate

Topic Closed

This topic has been closed to new replies.

About this Topic