The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Changing Custom Post Type Name

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #40171

    Is there a way?


    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)
  • The forum ‘Other’ is closed to new topics and replies.