Site logo

Archived topic

Change theme without losing Custom Post Type

1 reply · Started by anabella on April 18, 2021

Viewing posts 1–2 of 2

Hi,

I want to change the theme: switch from a custom theme (custom-created by a web developer) to Generatepress, but I am a bit concerned about the custom post types: the original theme has 4 CPTs that were created as part of the theme, and these CPTs have quite a lot of content published, so I need to make sure that we don't lose anything.

I was able to found the code (how the CPT were registered), so I was thinking about switching to Generatepress and using the plugin Code Snippets to paste the code.

Is this the right approach?

Thank you in advance.

Hi there,

it may require a little more then just the code that registers the CPTs as the original theme may have some specific templates for displaying them.

Would suggest creating a staging site. Copy any functions ( CPT registration ) and save any .php templates being used for CPT. Then install the GeneratePress theme, download and install a Child Theme. .

The child theme will allow you to add the functions to the functions.php and save any templates to the child theme folder.

Then see whats working and whats not.

This archived topic is closed to new replies.