WordPress.org

Ready to get started?Download WordPress

Forums

Where is to add Facebook Like Button code and help to add remain FB code (3 posts)

  1. PatRuppel
    Member
    Posted 1 year ago #

    I've checked in the forums with same question and have tried what was recommended but I still can't find <body>. I've tried going into my Header.php, Footer.php and Page.php but I still can't locate <body>.

    The first step in the XFBML configuring of my FB Like button says: (but I can't find <body>)

    1.Include the JavaScript SDK on your page once, ideally right after the opening <body> tag.

    <div id="fb-root"></div>
    <script>(function(d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) return;
      js = d.createElement(s); js.id = id;
      js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>

    The second FB Like button configuration step is:

    2.Add an XML namespace to the <html> tag of your document. This is necessary for XFBML to work in earlier versions of Internet Explorer.
    <html xmlns:fb="http://ogp.me/ns/fb#">

    And the last step is:

    3.Place the code for your plugin wherever you want the plugin to appear on your page.

    <fb:like href="http://plaintalkandordinarywisdom.com" send="true"
    width="450" show_faces="true" font="arial"></fb:like>

    Can you please give me directions on where to add these codes, as I'm challenged when it comes to the techy part in code and don't want to mess it up when completing this configuration process.

    Thank you [email removed]

  2. essaysnark
    Member
    Posted 1 year ago #

    You might want to try using a plugin instead. This tutorial explains several methods of getting this functionality:
    http://www.wpbeginner.com/wp-tutorials/how-to-add-the-facebook-like-box-fan-box-in-wordpress/

  3. PatRuppel
    Member
    Posted 1 year ago #

    Thank you EssaySnark for the link. I will follow and look into it from there. I appreciate your help.

Topic Closed

This topic has been closed to new replies.

About this Topic