Support » Fixing WordPress » custom post types – uneditable in dashboard

  • Hello,
    I made a custom post type back when WordPress version 3.1 was the latest. Unfortunately i used camel case for both the post type and the taxonomy.

    In recent versions it seems that camel casing these words is not supported so i am stuck with 397 posts that can’t be edited in the back or seen at the front end.

    What are my options apart from copying over all the data into a new post type that follows the rules?

    I looked at the database but i’m not sure i want to get into that!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Actually i can’t copy anything over as the editing is locked and the content is not viewable, Doh! No choice but to fiddle with the database…… hmmm….

    First, change the name of the custom post type in your register_post_type function.

    Then, the easiest thing to do is run a database query directly, inside phpMyAdmin or whatever. If your database prefix was wp_, it would look like this:

    UPDATE wp_posts SET post_type = 'new_post_type_name' WHERE post_type = 'oldPostTypeName';

    Back up your database before doing this!

    I just found this link to stack exchange and tried it, adding a function to functions.php that has successfully renamed the post type. All the links have come back on in the admin. Still nothing out front though.

    Here is the code i used and i’m trying adapt it to access the wp_term_taxonony table.

    global $wpdb;
    $wpdb->query("UPDATE $wpdb->wp_term_taxonomy SET taxonomy = 'imggallery' WHERE taxonomy = 'imgGallery'");

    Nothing doing yet that i can see in the database

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘custom post types – uneditable in dashboard’ is closed to new replies.