Tagged: facebook share
-
AuthorPosts
-
June 10, 2015 at 2:48 pm #457246
Dear Sir,
I want to copy the code from fb SDK: https://developers.facebook.com/docs/plugins/share-button
I paste in text content and also code element, but…
And not displaying in frontpage only in admin can see.Ty,
Daniel
June 10, 2015 at 4:51 pm #457356Hi dwebprojects!
There is two snippets of code that it gives you. Are you sure your adding both to the codeblock element?
The first snippet it gives you may need to be added to the end of the page but I do not think it matters. You could add this to your child theme functions.php file to add it near the bottom of the page.
add_action( 'wp_footer', 'enfold_customization_footer_scripts' ); function enfold_customization_footer_scripts(){ ?> <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> <?php }
Best regards,
Elliott- This reply was modified 9 years, 5 months ago by Elliott.
June 10, 2015 at 5:10 pm #457378I put your code to the function.php
then i paste the code to a normal text block: ( generated by sdk)
<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/hu_HU/sdk.js#xfbml=1&version=v2.3&appId=890293360981783″;
fjs.parentNode.insertBefore(js, fjs);
}(document, ‘script’, ‘facebook-jssdk’));</script><div class=”fb-share-button” data-href=”http://www.zsidokulturalisfesztival.hu/dohanyzsinagogaprogramja/#kern” data-layout=”button”></div>
June 11, 2015 at 5:03 pm #457917Hey!
and does it work for you now? If yes thanks for sharing your solution!
Let us know in a new ticket if you have some more questions related to the theme.
Best regards,
AndyJune 11, 2015 at 5:04 pm #457919no. :-(
June 12, 2015 at 6:06 pm #458526Hey!
A normal textblock is not going to work, it needs to be in a codeblock element. Also, the first snippet is what I added to the code in my example so you do not need to add that to your page content, just the second snippet wherever you want it to display.
Send us a link to your page.
Best regards,
Elliott -
AuthorPosts
- You must be logged in to reply to this topic.