Custom Post Type Page 404
-
I’ve been following along with a tutorial for creating custom post types and keep getting stuck. For some reason, I get a 404 page when trying to show a page for the new post type.
class JM_Movies_Post_Type{ public function __construct() { $this->register_post_type(); } public function register_post_type() { $args = array( 'labels' => array( 'name' => 'Movies', 'singlar_name' => 'Movie', 'add_new' => 'Add New Movie', 'add_new_item' => 'Add New Movie', 'edit_item' => 'Edit Item', 'new_item' => 'New Item', 'view_item' => 'View Movie', 'search_items' => 'Search Movies', 'not_found' => 'No Movies Found', 'not_found_in_trash' => 'No Movies Found in Trash' ), 'query_var' => 'movies', 'rewrite' => array( 'slug' => 'movies/', ), 'public' => true ); register_post_type('jm_movie', $args); } } add_action('init', function (){ new JM_Movies_Post_Type(); });
Any ideas where my error is?
Thanks[No bumping, thank you.]
- The topic ‘Custom Post Type Page 404’ is closed to new replies.