• Hello,

    I am using a custom post type for a theme and the strange thing is that, the single-<post_type> template works perfecly but when i try to access a page i get a 404 error.

    I have rebuilt the permalinks and still get the error.

    There is no naming conflict with any page.

    The code i am using is the following:

    $args_video = array(
                'label' => 'Video',
                'labels' => $labels_video,
                'description' => 'videos',
                'public' => true,
                'exclude_from_search'=>true,
                'show_ui' => true,
                'show_in_menu'=>true,
                'map_meta_cap'=>true,
                '_edit_link' => 'post.php?post=%d',
                'capability_type' => 'post',
                'hierarchical' => false,
                'taxonomies' => array('raz_video'),
                'rewrite' => array("slug" => "raz_video"), // Permalinks format
                'supports' => array('title','page-attributes','thumbnail'),
                'has_archive' => true
            );
            $r = register_post_type('raz_video',$args_video );

    Has anyone had this issue before?

    Thanks in advance,

    Luis

  • The topic ‘404 error on pages after adding a custom post type’ is closed to new replies.