Test Review.

★ 10/10
July 14, 2025 at 6:42 am

The behavior you’re describing—the slug being removed upon page load—is a classic symptom of a “canonical redirect” in WordPress. When WordPress sees a URL like /movie/some-movie/add-review/, it thinks, “I know /movie/some-movie/ is a single post, so this /add-review/ part must be a mistake,” and it helpfully “corrects” the URL by redirecting you to what it thinks is the correct (canonical) URL.

My previous attempts tried to fight this redirect, but they were either too aggressive (breaking the page) or not aggressive enough.

The correct solution is to intercept the request early, confirm that the URL is one of our valid custom pages, and then tell the main WordPress query to essentially do nothing. This prevents the redirect from ever happening and allows our custom template loader to take over as intended. fdfdfdfd

0 of 1 people found this helpful.

One response to “Test Review.”

Leave a Reply