WordPress.org

Ready to get started?Download WordPress

Forums

Facebook like counter keeps on resetting (4 posts)

  1. triphys
    Member
    Posted 2 years ago #

    I have a facebook like counter below my posts and last night we had 26 likes on one post, and then suddenly we had none. Now it's 17 likes and it keeps jumping back and forth.
    Seems like it resets when someone is posting a comment, but I'm not sure.

    This is the code i'm using on single.php.

    <div class="entry">
    
    <div id="sociallikes1">
    <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_GB/all.js#xfbml=1&appId=266693680020880";
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>
    					<div class="fb-like" data-send="true" data-layout="button_count" data-width="100" data-show-faces="false"></div>
    
    				</div>
    					<?php the_content(''); ?>
    					<?php link_pages('<br><p><strong>Sida:</strong> ', '</p>', 'number'); ?></div>

    Help is much appreciated!

  2. Pioneer Valley Web Design
    Member
    Posted 2 years ago #

    This is documented here. Did you want the data-width at 100?

  3. triphys
    Member
    Posted 2 years ago #

    Can't really find it there :/

    What does the data-width do? I think I have it on 100 as default.

  4. Pioneer Valley Web Design
    Member
    Posted 2 years ago #

    It sets the width of what is displayed and by default (from Facebook) it is 450

    Please read up on this at the Facebook link.

Topic Closed

This topic has been closed to new replies.

About this Topic