Add a Facebook Like Page to category bar

This topic has 11 replies, 2 voices, and was last updated 4 years, 10 months ago ago by MichaelB

  • Avatar: MichaelB
    MichaelB
    Participant
    January 10, 2021 at 22:24

    As per subject title, can you add that on your theme? If so, how do I add it?

    I would like to do method one from the below link, but where do I paste the code?
    https://www.wpbeginner.com/wp-tutorials/how-to-add-facebook-like-button-in-wordpress/#:~:text=Method%201%3A%20Manually%20Add%20Facebook%20Like%20Button%20in%20WordPress&text=First%2C%20you%20need%20to%20visit,of%20the%20Like%20button%20below.

    Please, contact administrator
    for this information.
    10 Answers
    Avatar: Olga Barlow
    Olga Barlow
    Participant
    January 11, 2021 at 17:38

    Hello,

    Use the Insert headers and footers plugin to add the JS code to body.
    After that edit the header using header builder and add the HTML block 3 element to the connection block https://prnt.sc/wl4t6a and add the necessary code to HTML block 3 area to display your button

    Regards

    Avatar: MichaelB
    MichaelB
    Participant
    January 11, 2021 at 20:30

    How do I do this?

    Use the Insert headers and footers plugin to add the JS code to body.

    Avatar: Olga Barlow
    Olga Barlow
    Participant
    January 12, 2021 at 14:50

    Hello,

    Install plugin https://wordpress.org/plugins/insert-headers-and-footers/ and add the code from the instruction https://prnt.sc/wlub7f to Scripts in Body https://prnt.sc/wluamq

    Regards

    Avatar: MichaelB
    MichaelB
    Participant
    January 12, 2021 at 17:34

    Thanks, Olga!

    All understood 🙂

    Avatar: Olga Barlow
    Olga Barlow
    Participant
    January 12, 2021 at 18:57

    You are welcome.

    Regards

    Avatar: MichaelB
    MichaelB
    Participant
    January 12, 2021 at 22:58

    Thanks.

    I’ve added the ‘like’ button and it works. However, I’m concerned I’ll lose the like button when I next update your theme. Please see below for why…

    I added the code from step 2 to the header.php file. The file was found in the xstore folder rather than the xstore child theme folder.

    I use a child theme, so does that mean my like button will disappear when I next update the theme?

    I don’t want the like button to disappear when I next update your theme…

    I look forward to a response.

    Avatar: Olga Barlow
    Olga Barlow
    Participant
    January 13, 2021 at 12:04

    Hello,

    Install plugin https://wordpress.org/plugins/insert-headers-and-footers/ and add the code from the instruction https://prnt.sc/wlub7f to Scripts in Body https://prnt.sc/wluamq instead of editing the parent theme files! Then you won’t lose your button after the update.

    Or copy header .php file to child theme. Read what the child theme is and how it use https://developer.wordpress.org/themes/advanced-topics/child-themes/

    But I would suggest you to use the insert-headers-and-footers plugin to add the custom scripts to header or footer.

    Regards

    Avatar: MichaelB
    MichaelB
    Participant
    January 27, 2021 at 00:25

    Thanks Olga.

    This is what I’ve done…

    I’ve installed the headers and footers plugin.

    I’ve added the code you mentioned to scripts in body.

    This is where I’m not sure if I’ve done it right…

    I basically used the XStore theme options to add it to where I want (please login into the account provided and look at HTML 3 block. Link: https://prnt.sc/xocw76)

    Account details including website provided in the private content area.

    I would like to know if ALL of the above I did means I will not lose the ‘Like’ button when I next update.

    Thanks!

    Please contact administrator
    for this information.
    Avatar: Olga Barlow
    Olga Barlow
    Participant
    January 27, 2021 at 18:57

    Hello,

    You won’t lose the like button after update. Everything is correct. Also, you can make backup of Theme Options from Theme Options > Import/Export > download the export file to a safe place.

    Regards

    Avatar: MichaelB
    MichaelB
    Participant
    January 27, 2021 at 18:59

    Thanks for checking.

    🙂

  • Viewing 11 results - 1 through 11 (of 11 total)

The issue related to '‘Add a Facebook Like Page to category bar’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.