Hot answers tagged


Is this a WordPress feature? Yes, and the redirect is being done by redirect_canonical(), but the URL is determined by redirect_guess_404_permalink(): redirect_guess_404_permalink() Attempts to guess the correct URL for a 404 request based on query vars. So what's happening in your case is, WordPress attempts to find a post having book in the slug (...


Did you try to exit; after the wp_redirect()? “Note: wp_redirect() does not exit automatically, and should almost always be followed by a call to exit;”


SOLUTION: With some playing around I realized I am definitely an idiot and WAY over-thought things. While I had previously read and tried some of the things in this similar post, I ended up substituting their code for mine and found it actually worked for my use case. In trying to understand why that was, I began trying to convert it to become mine and ...

Only top voted, non community-wiki answers of a minimum length are eligible