• Hello,

    I have created a Child Theme but all I have in it at present is a style.css file.

    I am trying to embed Facebook ‘Like’ buttons in my site and to do so Facebook is telling me to

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

    To do this do I :

    ? Go to the File Manager for my site on my hosting service control panel

    ? Copy the contents of my header. php file in my Parent Theme

    ? Create a new header.php file in my Child Theme Folder and paste the copied contents into this folder

    ? Then, in my wordpress dashboard editor, insert the code from facebook after the opening <body> tag in my new Child Theme header.php file ????

    In my header.php file I can see this ‘<body <?php body_class(); ?>>’ near the top of the page but cannot find any closing tag </body>.

    Where should I paste the code?

    Really appreciate your help, Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The closing body tag is in the footer.php file.

    Thread Starter Paulc66

    (@paulc66)

    Thanks WPyogi,

    So to follow facebooks instructions- ‘Include the JavaScript SDK on your page once, ideally right after the opening <body> tag.’

    Are the following steps right:

    Go to the File Manager for my site on my hosting service control panel

    ? Copy the contents of my header. php file in my Parent Theme

    ? Create a new header.php file in my Child Theme Folder and paste the copied contents into this folder

    ? Then, in my wordpress dashboard editor, insert the code from facebook after the opening <body> tag in my new Child Theme header.php file ????

    Yep, that sounds generally correct, though the exact place to put the code may depend on your theme/site.

    Are you using a plugin for this?

    Thread Starter Paulc66

    (@paulc66)

    Not using a plugin WPyogi, have done it by creating child header php and pasting in code after opening body tag and seems to have worked.

    Thanks alot for your help

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Inserting Facebook 'like' button code – new Child Theme header.php?’ is closed to new replies.