All Posts by Email, Once a Week

Media Temple logo

CSS-Tricks is brought to you in part by Media Temple, the web hosting that we both use and recommend.

Changing Custom Post Type Name

  • # October 5, 2012 at 6:57 pm

    Is there a way?

    # October 6, 2012 at 11:13 am

    For anyone coming across this, you need to do the following:

    Change the name in your plugin settings and code from your template files (functions.php, etc).

    Go into phpMyAdmin and click on your WordPress database.

    Click on SQL and run this command:

    SELECT * FROM wp_posts where post_type = ‘custom-post-type-name-goes-here’

    Change the guid field and the post_type field from your old post type name to your new one.

    Note: If you’re content starts duplicating on your site from the post type you had just changed, you need to rename your template file.

    Example: single-(new-custom-post-type-name).php

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed