How to replace old page with a CPT archive layout and use same URL?

The existing page has a permalink like: /about-us/our-team and I want to replace it completely with a new CPT archive layout.

So on a staging copy, I’ve trashed the original page and then I went into the ‘our team’ CPT settings in ACF and in advanced settings > URLs, and set the ‘permalink rewrite’ dropdown to ‘custom permalink’ with a slug set the same as the original page I’m wanting to replace: /about-us/our-team/. But I just get a 404 on the frontend. It works if I use any other custom permalink for this CPT, like /test/testing/ but not the URL where the old page used to be. Main permalinks are set to ‘post name’ in WP settings.

Any ideas how I can get this new CPT page to use the same URL as the deleted page and still work?

Hello @threeoten,

Thanks for writing in! You are using a custom permalink for your “Team” custom post type.

And also, you have disabled the “Archive” for your custom post type. You will have to create the “Our Team” page as a child page of your “About Us” page and then use Loopers to display the Team items.

Best Regards.

I think there’s a misunderstanding. Let me explain again.

  1. I have an old “our team” page (a page in wordpress, not a post or CPT) which uses /about-us/our-team/ as the URL.

  2. I have decided that I want to make an all new “our team” page using a CPT instead and I need this new CPT’s URL to be the same exact URL as the OLD “our team” page mentioned in #1 (for SEO reasons).

  3. In an attempt to accomplish this, I did the following:

  • I created a staging site copy of my site
  • I created the NEW CPT and built an archive layout page for it in Cornerstone
  • I completely deleted the OLD “our team” page and its child pages (in order to free up the /about-us/our-team/ URL)
  • I went into the NEW “our team” CPT settings in ACF and in advanced settings > URLs, I set the ‘permalink rewrite’ dropdown to ‘custom permalink’ with a slug set the same URL as the OLD “our team” page that I’m wanting to replace: /about-us/our-team/
  1. I thought that this would cause the NEW CPT page (the archive layout page built in Cornerstone) to now live at the same URL as the OLD page, but I only get a 404 when loading the page.
  • I’ve tried clearing all caches (browser, cornerstone, cloudflare, plugins) and disabling caching plugins.
  • I’ve tried flushing the permalinks by clicking update in the main permalink settings page.
  • Turning off the CPT archive page toggle

How can I get this new CPT to use the same URL as the OLD page and successfully load without getting a 404?

Hello There,

Even if you have assigned the /about-us/our-team/ as your URL, the archive of the “Team” custom post type is disabled therefore there is no archive for this custom post type. Please edit your custom post type and enable the Archive option and see how it goes.

Best Regards.

Incase anyone else runs into this issue… I got it to work. I decided to just try all over again with a new staging copy of the site, but this time I renamed the old page’s slug to something else before deleting it… that seemed to do the trick! And yes, the archives should be enabled.

Hello @threeoten,

Glad that things are well for you, thanks for sharing the information.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.