WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have pretty permalinks enabled like this:


I also use facebook comments widget for the comments, Currently the href attribute is set to the pretty permalink by calling the_permalink().

The issue is that if i ever happen to edit the post name (slug) or the category, Facebook thinks it's a new URL so the old comments are not displayed anymore.

I tried fixing the issue by pointing the href to the non-pretty permalink like: http://domain.com/?p=XXX but now Facebook shows a warning that it can't reach the URL, that's because WP redirects non-pretty urls to pretty with a 301 redirect.

Any idea how to work around this?

share|improve this question

I hate to say it, but the answer is to not edit the post slug or category.

Yes, you can edit the post name ... but leave the slug alone. Remember, other people (users, Google, etc.) use these URLs as well, so changing the URL of a post around makes them think it's a new URL, too.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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