Codeless
  • Support Home
  • Themes
  • Support
  • WordPress Tutorials
    • How to Start a Blog
    • Best Website Builders
    • Best Small Business Hosting
    • Email Marketing Services
    • Cheap WordPress Hosting
  • Video Tutorials

Community Forums

Add Facebook Script

#facebook #footer #script
    • 5 years, 7 months ago dickieassoc
      Participant

      Expired

      I would like to add the following script to allow Facebook feed to the footer of the website planforaction.com. The instruction is to “Include the JavaScript SDK  on the page once, ideally right after the opening body tag.” Would you please advise?

      <div id=”fb-root”></div>
      <script async defer crossorigin=”anonymous” src=”https://connect.facebook.net/en_US/
      sdk.js#xfbml=1&version=v5.0&appId=580653712672929&autoLogAppEvents=1″></script>

      • This topic was modified 5 years, 7 months ago by dickieassoc.
      • This topic was modified 5 years, 7 months ago by dickieassoc.
      • This topic was modified 5 years, 7 months ago by dickieassoc.
      • This topic was modified 5 years, 7 months ago by dickieassoc.
    • 5 years, 7 months ago Mirela
      Participant

      Hello,

      I suggest you add the script in the footer.php file. Save a copy of the edited file or use a child theme.

      Best regards!

    • 5 years, 7 months ago dickieassoc
      Participant

      Expired

      Since there is no opening body tag in the Secular>Theme Footer (footer.php) file, would you please advise where, in the file, I should place the new script. If you could use the attached screenshot and advise by line number where the script should be placed, that would be most helpful.

    • 5 years, 7 months ago Mirela
      Participant

      Hello,

      The body tag includes all the footer as well. I suggest you add your code before the closing div tag in line 12.

      Or even better, try adding the script in Specular > General Options > Custom JS Code.
      Let us know.

      Best regards!

    • 5 years, 7 months ago dickieassoc
      Participant

      Expired

      I like the idea of adding the code in the Custom JS Code. Thus preserving and not editing the footer.php file. However, when I paste the following into the Custom JS Code:

      <div id=”fb-root”></div>
      <script async defer crossorigin=”anonymous” src=”https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v5.0&appId=580653712672929&autoLogAppEvents=1″></script&gt;

      I get an error that reads:
      “Expected an identifier and instead saw “<“. Missing “;” before statement.”

      Are you able to provide me with the accurate format to place this code?

      • This reply was modified 5 years, 7 months ago by dickieassoc.
    • 5 years, 7 months ago dickieassoc
      Participant

      Expired

      In followup to the last reply, please go to this LINK to see the screenshots of the setup. I’m not sure if this is correct and would greatly appreciate your advise. A text link appears in the FOOTER of the website, but the goal is to have the Facebook feed appears there, as described here: https://developers.facebook.com/docs/plugins/page-plugin/

    • 5 years, 7 months ago dickieassoc
      Participant

      Expired

      Mirela

      Are you able to help me with this?

    • 5 years, 7 months ago Mirela
      Participant

      Hello,

      Please add some wp credentials in a private reply. So i can check this closely.

      Best regards!

    • 5 years, 7 months ago dickieassoc
      Participant

      Expired

      This reply has been marked as private.
    • 5 years, 7 months ago Mirela
      Participant

      Hello,

      I added the script in file footer.php before the closing div tag in line 12, as instructed in earlier replies.
      The fb box is displaying in footer ok now. See screenshot: https://ibb.co/6cKFnx5

      Please refresh the site.
      Best regards!

    • 5 years, 5 months ago dickieassoc
      Participant

      Expired

      thanks for the solution!

    • 5 years, 5 months ago Ludjon
      Keymaster

      You’re welcome :)

      If you like our theme and support, leave us a rating on Themeforest, it’s very important for us :)

      https://themeforest.net/downloads

      Thank You so much

Viewing 11 reply threads

You must be logged in to reply to this topic.

Login

Log In
Register

Renew Support

  • Renew Specular Support
  • Renew Tower Support
  • Renew Folie Support
  • Renew Handel Support
  • Renew June Support
  • Renew Picante Support
  • Renew Thype Support
  • Renew Regn Support

Search Forums

Forums

  • Bygge – Construction Theme
  • Converta – Software Theme
  • Folie – The WordPress Website Builder
  • Handel – Responsive Multi-Purpose Business Theme
  • June WooCommerce WordPress Theme
  • Livecast – Podcast Theme
  • Picante – Restaurant & Food WordPress Theme
  • Regn | Agency & Business WordPress Theme
  • Remake – Minimal Portfolio & Agency Theme
  • Specular – Multi-Purpose WordPress Theme
  • Suggest us Features
  • Tower – Business-Driven Multipurpose WP Theme
  • Vibrance – Photography Theme

Site Links

  • Support Policy
  • Specular Support Forum
  • Video Tutorials
  • Knowledge Base
  • Guides and Reviews

Useful Articles

  • Build a Website
  • Web Design & Development
  • Hosting
  • WordPress

Login

Log In
Register Lost Password