Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #429364

    Hi,

    Where can I add this code:
    <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/sdk.js#xfbml=1&version=v2.3&appId=120750241359063”;
    fjs.parentNode.insertBefore(js, fjs);
    }(document, ‘script’, ‘facebook-jssdk’));</script>

    Thanks
    Charlotte

    #430004

    Hey Charlotte!

    Please add following code to Functions.php file in Appearance > Editor

    function add_custom_tooltip(){
    ?>
    
    YOUR CODE GOES HERE INCLUDING SCRIPT TAGS
    
    <?php
    }
    add_action('wp_footer', 'add_custom_tooltip');

    Best regards,
    Yigit

    #430242

    Hi there,

    thanks for your reply but it did not work well.

    When I try edit a page I got this message:
    Parse error: syntax error, unexpected ‘<‘ in /home/d8737/airlinestaffrates.com/wp-content/themes/enfold/functions.php on line 518

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

    #430313

    Hi Charlotte!

    Please try copying the code from here – http://pastebin.com/7JawGzDU

    Cheers!
    Yigit

    #430331

    Great, that worked, thanks :)

    #430335

    Hey!

    You are welcome Charlotte, glad we could help :) Have a nice weekend!

    Cheers!
    Yigit

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Add code before body tag’ is closed to new replies.