WordPress.org

Ready to get started?Download WordPress

Forums

Kontrol Developer Kit
[resolved] Custom post type 404 (9 posts)

  1. Silverbug
    Member
    Posted 1 year ago #

    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/

  2. Kontrolwp
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  3. Kontrolwp
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  4. murtazakhussain
    Member
    Posted 1 year ago #

    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

  5. murtazakhussain
    Member
    Posted 1 year ago #

    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

  6. murtazakhussain
    Member
    Posted 1 year ago #

    Your query returning an empty array, because there are no rows in table wp_kontrolwp_cpts

  7. murtazakhussain
    Member
    Posted 1 year ago #

    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

  8. Kontrolwp
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  9. murtazakhussain
    Member
    Posted 1 year ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.