Tagged: enfold, facebook, facebook group, sdk
-
AuthorPosts
-
March 2, 2019 at 3:32 pm #1073612
Hi Kriesi
Which code do I need to place in my Child Theme’s functions.php for the
https://developers.facebook.com/docs/plugins/group-plugin/
to work?I would like to place the
<div class="fb-group" data-href="https://www.facebook.com/groups/mygrouptitle/" data-width="280" data-show-social-context="true" data-show-metadata="false"></div>
in my Footer – Column widget.Thank you for your time.
March 4, 2019 at 5:36 am #1074138Hey waveshaper,
Did you try to press the Get Code button to see what it gives you? We can give you a function to use after that.
Best regards,
RikardApril 14, 2019 at 2:36 pm #1090624Hi Rikard
Thank you for taking the time to look into this.Please see below code –
Step 2: Include the JavaScript SDK on your page once, ideally right after the opening body tag.<div id="fb-root"></div> <script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.2&appId=myappid&autoLogAppEvents=1"></script>Step 3: Place this code wherever you want the plugin to appear on your page.
<div class="fb-group" data-href="https://www.facebook.com/groups/mygroup/" data-width="280" data-show-social-context="true" data-show-metadata="true"></div>Much appreciated.
April 14, 2019 at 2:50 pm #1090629I would like to place the code in one of my footer widgets. Thank you.
April 15, 2019 at 5:48 am #1090833Hi,
Please try this in your functions.php file:
function waveshaper_add_facebook_code(){ ?> <div id="fb-root"></div> <script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.2&appId=myappid&autoLogAppEvents=1"></script> <?php } add_action('ava_after_body_opening_tag', 'waveshaper_add_facebook_code');Then paste the second part (step 3) in your footer widget.
Best regards,
Rikard -
AuthorPosts
- You must be logged in to reply to this topic.
