How to force a 404 on WordPress

Posted by Prem Tiwari | Updated on

You could try the WordPress function status_header() to add the HTTP/1.1 404 Not Found header. So your Code 2 example would be:

This function is for example used in this part:

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers