Custom post type single page returns 404 error

Posted by Prem Tiwari | Updated on

You should set your publicly_queryable argument to true when registering your custom post type.

Add flush_rewrite_rules(), refresh the page once or twice and REMOVE IT IMMEDIATELY. You SHOULD NOT keep flush_rewrite_rules() unless under the provisions as in the codex.


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

Related Questions & Answers