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?

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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