Support » Fixing WordPress » Facebook Likes counts, from 100 to 0 after moving WP

  • I have a website with many news. Lots of them have good Facebook Likes numbers (up to 100 likes for some articles and galleries)
    After moving wordpress form “/news” to “/” (root), and doing an htaccess 301 rewrite redirect : all the facebook likes are at 0 !! (except the new artciles I am adding to the site)

    After 4 hours… I have done many search on the web. I have done many tryal-errors in the code lines… just can’t seem to get a code that will tell Facebook to use my old url

    MY OLD CODE LINE that was working before is move

    <iframe src="<?php echo urlencode(get_permalink($post->ID)); ?>&layout=button_count&show_faces=false&width=100&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:25px;"></iframe>

    MY NEW CODE LINE, working, but not as I want to

    <div class="fb-like" data-href="<?php echo get_permalink(); ?>" data-width="100" data-layout="button_count" data-show-faces="false" data-send="false"></div>

    …remember that “/news” is the old location

    ?? IN PHP, HOW TO tell my wordpress code line to show exactly

    I have try many variation like these, but their results are not working okay<?php echo urlencode(($post->ID)); ?>
    <?php echo urlencode(get_permalink('/news/')($post->ID)); ?>

Viewing 15 replies - 1 through 15 (of 20 total)
Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Facebook Likes counts, from 100 to 0 after moving WP’ is closed to new replies.