Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

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

  • 28-10-2013 06:20PM
    #1
    Registered Users, Registered Users 2 Posts: 87 ✭✭


    Wordpress Question, not sure if this is the correct forum - please redirect if necessary.

    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 ????


    Novice afraid of destroying first website, cheers


Comments

  • Registered Users, Registered Users 2 Posts: 7,208 ✭✭✭Talisman


    If you are a novice my advice would be to install a plugin such as Social Stickers rather than diving straight into hacking a child theme.


  • Registered Users, Registered Users 2 Posts: 6,683 ✭✭✭daymobrew


    Maple77 wrote: »
    Novice afraid of destroying first website, cheers
    With a child theme you can't really destroy the website. If you copy a file from the parent them and then edit it and it doesn't work, simply delete it.


  • Registered Users, Registered Users 2 Posts: 87 ✭✭Maple77


    I'll check out that plugin. And good to hear that if I create a child folder and mess up I can just delete it. Thanks


Advertisement