Wordpress Custom Post Type created post not found?
If you use custom_post_type in wordpress, and you find that you can successfully create a custom post type in your back-end admin area, while you can also create a custom post in back-end but you cannot see your created post, please check the following:
In your register_post_type function, there is an argument called "publicly_queryable", if you set it to false, you will find that you cannot see your page (return 404 not found).
So set it to true to see your post.
Update:
It seems that another reason of 404 error is because of the permalink problem. Please use register_activation_hook and register_deactivation_hook to call the function: flush_rewrite_rules(), it will help.
Reference: http://wordpress.org/support/topic/permalinks-404-with-custom-post-type?replies=40
In your register_post_type function, there is an argument called "publicly_queryable", if you set it to false, you will find that you cannot see your page (return 404 not found).
So set it to true to see your post.
Update:
It seems that another reason of 404 error is because of the permalink problem. Please use register_activation_hook and register_deactivation_hook to call the function: flush_rewrite_rules(), it will help.
Reference: http://wordpress.org/support/topic/permalinks-404-with-custom-post-type?replies=40
Comments