Changing themes - need to convert custom post types (6 posts)

  1. eoren1
    Posted 2 years ago #

    Hi. Would greatly appreciate some help as I switch from one Premium theme with custom post types to another with differently named post types.

    I built my current site using a theme with a Portfolio option. That site used the custom post type ‘portfolio’ and a permalink structure for portfolio items of site.com/portfolio/name.

    When switching to the new theme, my entire portfolio appeared to be missing. After searching for a solution, I realized the problem is that my former theme and the new one use different custom post types to define a portfolio.

    I downloaded the plugin Post Type Switcher and changed a single recent portfolio to a page. I then changed to the new theme and used the plugin to change that page to a portfolio-items as the new theme calls its custom post type.

    I now had two new problems:
    1. The new permalink structure for portfolio is site.com/portfolio-items/name – I'm not sure if this could lead to 404 errors. Do bots/xml sitemaps typically include these custom post types? If so, is there a good solution?

    2. When I clicked on the changed portfolio, the page would not open and my browser gave me a ‘redirect loop error’ showing the page failed to load. I'm not sure what led to this behavior but am guessing it was due to a plugin. I have since converted a smaller site and not gotten the redirect loop.

    So, going forward, my plan is:
    Backup and download off site
    1. In old theme:
    Use Post Type Switcher to convert every portfolio to page with same name and keep track of them
    2. Deactivate current theme
    3. Activate new theme
    4. Use Post Type Switcher to change all pages to portfolios
    5. Deactivate Post Type Switcher
    6. Regenerate all thumbnails

    Hope that makes sense and looking forward to your thoughts/suggestions.

  2. You may also want to reset the permalinks once your done your 6 steps. Sometimes custom post types can cause the 404 errors, but resetting the permalinks help.

    I would also submit a google xml sitemap if your not using WordPress seo by yoast and submit the new map when you're done, that way the bots will pick up your new urls in no time.

  3. eoren1
    Posted 2 years ago #

    Thank you very much for the quick response Christine!

    By resetting permalinks do you mean just hitting Save a couple times on the Permalinks settings page? I currently use the Day and Name setting. I had wanted to change to a postname structure but that seemed too big of a headache and I couldn't get past all the 404 errors when I last tried that 6 months ago (but that may be worth a second look at some point...)

    I will definitely submit a new XML and XML images sitemap - thanks for the suggestion.

  4. By resetting permalinks do you mean just hitting Save a couple times on the Permalinks settings page?

    Yes, that's what I meant.

  5. eoren1
    Posted 2 years ago #

    Ok. Thanks again. Really appreciate it.

  6. Subhramani
    Posted 2 years ago #

    Hello eoren1. Have you managed to successfully change the custom post types retaining the old permalinks? I am in the same situation as this, but the only difference is that I havent yet bought the new premium theme. I suspected such issues and wanted to find a solution before I ended spending that $50.

    It would be great if you can mention what you did and if it worked so that I can try the same steps too.

Topic Closed

This topic has been closed to new replies.

About this Topic