Custom post type single page returns 404 error

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

TAKE NOTE: 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.

this is an expensive operation so it should only be used when absolutely necessary

Leave a Comment