Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #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

    #457356

    Hi 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, 6 months ago by Elliott.
    #457378

    I 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&#8221; data-layout=”button”></div>

    #457917

    Hey!

    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,
    Andy

    #457919

    no. :-(

    #458526

    Hey!

    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

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.