WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Moved custom posts, resulting in broken links (2 posts)

  1. tdzl
    Member
    Posted 1 year ago #

    A little background:

    Client's WordPress site has a custom post type for portfolio. The client decided the portfolio section was too big, and wanted to change that section to 'Archive,' and create a new portfolio section with just a few standout projects.

    Here's what I did:

    1. Created a new template for the new portfolio section, and renamed old portfolio template to archive (both index template, and detail view template
    2. Registered new post type in funcitons.php for archive
    3. Renamed old portfolio page to archive and champed template
    4. Created new page for new portfolio posts
    5. Performed SQL search/replace to move all old portfolio posts to archive posts

    At this point, everything appeared to be working, except when I clicked on the archive post link in the index, the detail page came up with a redirect loop error. So I went back into PhpMyAdmin to investivate thinking I had missed a field that needed changing for the old portfolio posts (now archive posts).

    I found that the 'guid' field still referenced the portfolio post type, so search/replace changed those to reference the archive post type.

    This still didn't fix the problem - still getting the redirect loop error.

    What did I miss? Is there some serialized data that needs to be changed? Did I screw everything up beyond repair? I took a back up for the db in case I need to go back.

    Any help would be much appreciated.

  2. tdzl
    Member
    Posted 1 year ago #

    Nevermind, got it resolved. For reference, I just had to go into the Permalinks section and click save. This reset the permalink cache and all my links are now working.

Topic Closed

This topic has been closed to new replies.

About this Topic