Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted April 30, 201510 yr To create Facebook's follow button they say you should add this Javascript to your page:<div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> And then put this code where you want the button to appear:<div class="fb-follow" data-href="https://www.facebook.com/MyFacebookPage" data-colorscheme="light" data-layout="button" data-show-faces="false"></div> What's the best place to put the Javascript in an IPB Theme so it's available on every page? Is there a specific section in the default Theme for custom Javascript?
April 30, 201510 yr To create Facebook's follow button they say you should add this Javascript to your page: <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> And then put this code where you want the button to appear: <div class="fb-follow" data-href="https://www.facebook.com/MyFacebookPage" data-colorscheme="light" data-layout="button" data-show-faces="false"></div> What's the best place to put the Javascript in an IPB Theme so it's available on every page? Is there a specific section in the default Theme for custom Javascript? . This what you looking for ? .
July 10, 20159 yr Hello,I have put the code in templates/core/global/globalTemplate but it is not working; I can not see the answer of IN10TION.Some ideas?Regards,Rafa.
Archived
This topic is now archived and is closed to further replies.