Forums

Facebook comments showing the same comments on every blog pst (3 posts)

  1. FocusMedia
    Member
    Posted 1 year ago #

    I'm using WP 3.3.2, the Genesis framework and used the Facebook comments by going to Facebook and creating an app, which then gave me some code to put into my website.

    However, I'm getting the same Facebook comments on all my blog posts! I've looked at how to best fix this and haven't come across anything that's helpful. The site is pretty large with a lot of posts, so I want to fix this as soon as possible. Any ideas?

    Here is the code. The first half goes in after the WP post (in Genesis Hooks, genesis_before_comments), and the second half goes before the closing /body tag.

    <div class="fb-comments" data-href="http://www.mywebsite/ " data-num-posts="3" data-width="590"></div>

    <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/all.js#xfbml=1&appId=250254308400020";
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>

    [ Please do not bump, it's not permitted here. ]

  2. Michael Long
    Member
    Posted 10 months ago #

    Basically, the data-href is wrong. It needs to be unique for every post. This is what I have for my site:

    <fb:comments href="<?php the_permalink() ?>" num_posts="20" width="630"></fb:comments>

    I don't know if this will work in the Genesis hooks, or if you need to add it in the single.php template file itself.

  3. reklamdijital
    Member
    Posted 10 months ago #

    Bilgi için teşekkür http://www.reklamdijital.com

Topic Closed

This topic has been closed to new replies.

About this Topic