• Resolved toxoplasmaarts

    (@toxoplasmaarts)


    Hi,

    I’m transferring a site from an old theme to Astra (yay!). Originally, the site had both blog posts and custom post types. I’ve saved the php from the old theme for safe-keeping. In staging, I’ve activated Astra, and as expected, the custom post types are gone. I’m digging in the files and I’m at a loss of where to place this cpts.php…any ideas? Or will I need to manually create a new custom post type and re-enter the data?

    (URL listed is the live site that has been unchanged- but you will see that “issues” and “contributors” are cpts, while “text” and “art” are blog posts)

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hey @toxoplasmaarts,

    After switching the theme, you will not lose any data related to custom post types.

    Here you need to create a child theme, and you can carry forward the custom post type code from cpts.php file to the Astra child theme’s functions.php OR you can just load cpts.php file from the Astra child theme’s functions.php file.

    To install a child theme, here is the child theme generator you can use – https://wpastra.com/child-theme-generator/

    Please let me know if you need further help with this.

    Regards,
    Vikas

    Thread Starter toxoplasmaarts

    (@toxoplasmaarts)

    Thank you Vikas!
    I have all the original .php for those CPTs, and couldn’t figure out where they went in the new theme.
    I’ve already made significant changes to the new site, so could I export my files that I’m working on (staging site with Astra/Elementor), add my cpts.php to that copy, and load in? I don’t want to start fresh with a new child theme that will overwrite that work I did.

    thanks!

    Thread Starter toxoplasmaarts

    (@toxoplasmaarts)

    Actually, never mind– I figured it out!! Thanks!

    Glad you did!

    Please feel free to open up a ticket through our support center if you need any further help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Transferring Custom Post Type from old theme’ is closed to new replies.