Title: Inserting Facebook &#039;like&#039; button code &#8211; new Child Theme header.php?
Last modified: August 21, 2016

---

# Inserting Facebook 'like' button code – new Child Theme header.php?

 *  [Paulc66](https://wordpress.org/support/users/paulc66/)
 * (@paulc66)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/inserting-facebook-like-button-code-new-child-theme-headerphp/)
 * 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)

 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/inserting-facebook-like-button-code-new-child-theme-headerphp/#post-4263575)
 * The closing body tag is in the footer.php file.
 *  Thread Starter [Paulc66](https://wordpress.org/support/users/paulc66/)
 * (@paulc66)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/inserting-facebook-like-button-code-new-child-theme-headerphp/#post-4263686)
 * 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 ????
 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/inserting-facebook-like-button-code-new-child-theme-headerphp/#post-4263714)
 * 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](https://wordpress.org/support/users/paulc66/)
 * (@paulc66)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/inserting-facebook-like-button-code-new-child-theme-headerphp/#post-4263810)
 * 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.

 * 4 replies
 * 2 participants
 * Last reply from: [Paulc66](https://wordpress.org/support/users/paulc66/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/inserting-facebook-like-button-code-new-child-theme-headerphp/#post-4263810)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
