Title: Custom post type 404
Last modified: August 20, 2016

---

# Custom post type 404

 *  Resolved [Silverbug](https://wordpress.org/support/users/silverbug/)
 * (@silverbug)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/custom-post-type-404-405/)
 * For some reason when I try and view a custom post type page from the front end,
   i get the 404 page not found page.
 * I’ve tried to find where i specify the template for the custom post(page) type
   but it’s not there.
 * Is there something else i need to do to display these custom post types on the
   site?
 * [http://wordpress.org/extend/plugins/kontrol-developer-kit/](http://wordpress.org/extend/plugins/kontrol-developer-kit/)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Author [Kontrolwp](https://wordpress.org/support/users/kontrolwp/)
 * (@kontrolwp)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/custom-post-type-404-405/#post-3603143)
 * Hey Silverbug,
 * 404’s on custom post types can sometimes be caused by permalinks not being updated
   after you’ve moved a site (and sometimes for other reasons). In your WordPress
   backend, go to Settings -> Permalinks and resave them, then go back to your custom
   post type and add a new post under it. Click the ‘View’ button once you’ve done
   this to make sure your getting taken to the correct url for that post type and
   see if that works.
 * If you’re still having issues it might be a symptom of something else causing
   issues. Do a new fresh install of WordPress somewhere else, install Kontrol, 
   create a custom post type and see how it goes then.
 * Hope that helps mate,
    Dave.
 *  Plugin Author [Kontrolwp](https://wordpress.org/support/users/kontrolwp/)
 * (@kontrolwp)
 * [13 years ago](https://wordpress.org/support/topic/custom-post-type-404-405/#post-3603243)
 * Hey Silverbug,
 * Since I haven’t heard back for a few weeks, I’m hoping you managed to figure 
   this out. I’ll mark it as resolved now.
 * Cheers,
    Dave.
 *  [murtazakhussain](https://wordpress.org/support/users/murtazakhussain/)
 * (@murtazakhussain)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/custom-post-type-404-405/#post-3603273)
 * Hi,
    I am having a similar kind of problem, after install Kontrol Plugin.
 * Whenever I go to **Create Custom Post Types**, after heading “**Native Custome
   Post Type**” page is empty. Whereas on my local installation its show two type
   of post types by default.
 * And when I create custom post type it saves successfully but doesn’t show anything.
 * Regards
 *  [murtazakhussain](https://wordpress.org/support/users/murtazakhussain/)
 * (@murtazakhussain)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/custom-post-type-404-405/#post-3603274)
 * Well it seems not working. Whatever I create, its not showing or creating either
   it is Custom Post Type or Custom Field. Noting is creating and working.
 * Any help appreciated.
 * Regards
 *  [murtazakhussain](https://wordpress.org/support/users/murtazakhussain/)
 * (@murtazakhussain)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/custom-post-type-404-405/#post-3603275)
 * Your query returning an empty array, because there are no rows in table wp_kontrolwp_cpts
 *  [murtazakhussain](https://wordpress.org/support/users/murtazakhussain/)
 * (@murtazakhussain)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/custom-post-type-404-405/#post-3603276)
 * I think this code have some issues
 * //install.php of every module.
 *     ```
       foreach ($table_data as $data) {
           // Check to see if we have these taxonomies in the table already
           $sql = "SELECT * FROM " . $table_name . " WHERE cpt_key = '" . $data['cpt_key'] . "' AND type = 'native' LIMIT 1";
   
           $results = $this->wpdb->get_results($sql);
   
           if (count($results) == 0) {
               // Add the modules to the table
               $this->wpdb->insert($table_name, $data);
           }
       }
       ```
   
 * Because tables are creating but data is not inserting.
 * Regards
 *  Plugin Author [Kontrolwp](https://wordpress.org/support/users/kontrolwp/)
 * (@kontrolwp)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/custom-post-type-404-405/#post-3603277)
 * Hey murtazkhussain,
 * Sorry to here you’re having issues mate. I’ve only had a handf ull of people 
   have this issue, so it’s a tricky one to pinpoint. There’s one quick way to get
   Kontrol to make sure all it’s tables and settings are correct is to deactivate
   it in the WordPress plugin area, then reactive it again in the same spot. This
   won’t effect any of the post types or fields you’ve already created with Kontrol.
 * Also what PHP version and server are you running this on?
 * Cheers,
    Dave.
 *  [murtazakhussain](https://wordpress.org/support/users/murtazakhussain/)
 * (@murtazakhussain)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/custom-post-type-404-405/#post-3603278)
 * Hi again,
    Nice to hear from you. I have debugged it a lot. and found some of
   the tables are getting populated and some are not. I am on critical stage of 
   my project so, it would be great if you sort it out. And I have activated/deactivated
   multiple times.
 * PHP version is **PHP Version 5.3.3**
 * Regards

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Custom post type 404’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/kontrol-developer-kit.svg)
 * [Kontrol Developer Kit](https://wordpress.org/plugins/kontrol-developer-kit/)
 * [Support Threads](https://wordpress.org/support/plugin/kontrol-developer-kit/)
 * [Active Topics](https://wordpress.org/support/plugin/kontrol-developer-kit/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/kontrol-developer-kit/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/kontrol-developer-kit/reviews/)

 * 8 replies
 * 3 participants
 * Last reply from: [murtazakhussain](https://wordpress.org/support/users/murtazakhussain/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/custom-post-type-404-405/#post-3603278)
 * Status: resolved