I am getting 404 template not found error while trying to view custom post type. What all I have done is
Step 1: Register new post type using register_post_type(‘tour_package’,$args);
Step 2 : Define rewrite value for my custom post type
$args = array(
‘rewrite’ => array(“slug” => “tourpackage”),
Step 3: Created a tour package template file in the themes directory naming single-tourpackage.php.
Now when I create a tour package from the admin ui, it gets saved properly as expected but when I click on view link against the tour package, I get 404 error.
- The topic ‘Facing 404 while creating custom post template’ is closed to new replies.