0

I have a strange permalink structure :

/%category%/news/%post_id%-%postname%.html

And I use the plugin "WP No Category Base"

It is working fine with one exception : When the "%postname%" part of the url is wrong, it generates a weird page with single.php template page, no content (title, date, author ...) but a lot of randoms comments from database in the comment section ....

How can I check if the URL is correct, and generate a 404 if it is not ?

Thanks

  • This is a very, very weird permalink structure. It might be causing the core matching functionality to fail. Before WordPress fails to a 404, it does a quick search to see if it can find anything close to the given url. I would look there first. – MikeNGarrett Apr 9 at 22:31

Your Answer

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

Browse other questions tagged or ask your own question.