-
-
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 4 years, 5 months ago by dickieassoc.
- This topic was modified 4 years, 5 months ago by dickieassoc.
- This topic was modified 4 years, 5 months ago by dickieassoc.
- This topic was modified 4 years, 5 months ago by dickieassoc.
-
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!
-
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.
-
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!
-
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>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 4 years, 4 months ago by dickieassoc.
-
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/
-
-
Hello,
Please add some wp credentials in a private reply. So i can check this closely.
Best regards!
-
-
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/6cKFnx5Please refresh the site.
Best regards! -
-
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
-
You must be logged in to reply to this topic.