404 error on pages after adding a custom post type (1 post)

  1. luismldias
    Posted 2 years ago #


    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,
                'show_ui' => 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,


Topic Closed

This topic has been closed to new replies.

About this Topic