0

I'm using Facebook comments box and just realized that when we use <div class="fb-comments" data-href="<?php the_permalink(); ?>" data-width="100%" data-numposts="5"></div> and then realize our title is wrong, changing the title (and slug in the process) we lose all social counts because they are tied to the url.

So I was wondering why I'm not using <div class="fb-comments" data-href="<?php the_guid(); ?>" data-width="100%" data-numposts="5"></div> instead.

The url as domain.com/?p=10000 doesn't change even if the slug/url or what ever would change.

Are there some caveats for this method I'm not realizing?

1

You need to 301 redirect the old URLs. This can be done by using Custom Permalinks plugin which automatically updates the 301 version of the URL and thus helping the Facebook plugin to recognise and restore the likes and comments.

  • Yeah if I change on the fly, that's true. But let's assume I'm starting a whole new site for example, is it ok to be using the guid instead of the "pretty" permalink? – jimihenrik Apr 30 '15 at 8:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.