Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #425486

    hi im just looking at the instructions at https://developers.facebook.com/docs/plugins/page-plugin

    They suggest the following

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

    From reading this tutorial http://designpx.com/tutorials/facebook-javascript-sdk/ it suggests I open up the single.php

    I work with a child theme. So should I copy the single.php file from the parent folder? Or create a new blank file called single.php?

    When I do theme updates my single.php evenatually will become out dated if I have to copy all its contents over. What do you suggest the best way to do this is?

    #425749

    Hey codecreative!

    The opening body tag is located in header.php, you could add it there or use the ava_after_main_container hook, also in the header, if you want to place your code in functions.php instead.

    Cheers!
    Rikard

    #426121

    Hi Rikard

    Can you provide an example of the ava_after_main_container hook ?

    Also can you suggest the best way to include the javascript facebook sdk?

    Am I best enqueue it from child theme functions file and have a js file seperate containing this js?

    #426380

    Hi!

    1- You can see example usage of the hook here – http://kriesi.at/documentation/enfold/adding-a-widget-area-to-the-header/
    2- Yes, enqueueing the file would be the correct approach.

    Best regards,
    Yigit

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.