The link to the archive page is saved into WordPress rewrite rules. These rules are used to locate several locations on the front end of your WordPress system. When you change the slug
of a Custom Post Type, the normal pages will redirect directly to the new location, but the archive page won’t, this because the rewrite rules aren’t regenerated.
To solve this, go to Settings -> Permalinks and save your permalink structure again, reload your page and the archive page will load correctly.
The rewrite rule in your .htaccess
won’t be needed.
Also, never put any rewrite rules in your .htaccess
except the ones WordPress writes into it.
If you want to add some rules, do this by using the Rewrite API.
Related Posts:
- Combining Multiple Taxonomies in one URL
- Removing CPT slug from URL results in 404 error for archive page
- Problems with 404, .htaccess, permalinks and WordPress custom posts locally on Snow Leopard
- Custom post type URL structure with site.com/custom_taxonomy_slug/post_name
- Custom taxonomy archive slug overwrites static page
- Rewriting archive page slug to be different than custom post type slug
- Including taxonomy term before post type breaks top level pages
- Use “archive” as slug for custom post type
- Custom post type / taxonomy rewrite archive page 2 gives 404
- Archive for CPT
- Is it better to use filter for the_content in archive pages?
- Can slugs from posts and custom post types conflict?
- Custom Post Type – Duplicate Page Slugs
- How can I get this request to use the Custom Post Type page template instead?
- Custom post type posts don’t show in archive widget
- Archive for a Taxonomy of a Custom Post type
- Redirect to another page using contact form 7? [closed]
- Remove permalink for custom post type
- Auto Slug Generation for Custom Post type
- How to make a posttype show under a page hierarchy (example.com/page/posttype/entry)?
- Custom Post Type archive-{post-type}.php not working
- Archive not sorting correctly
- Custom post type single page (single-{CPT-name}) 404 when slug includes hyphens
- How do you create %post_type%/%postname%/ permalink structure?
- What’s the name of the custom post type yearly archive template?
- Slug for custom post type
- Rename a slug label
- how to remove pages loading with the archive templates
- Archieve.php not loading for custom post type
- multiple custom post type on category page
- Custom Post type & Taxonomy 404
- Slug Confusion Between Post and Custom Post types?
- How to find a specific post_type using its “rewrite slug”?
- Different slug taxonomy for two different CPT
- How can I use archive-{post_type}.php theme template?
- How to add current custom taxonomy slug to body class
- Change Slug of a Custom Post Type
- Using page slug in wp_query
- Taxonomy archive 404ing (not term archive)
- Return the name of the post type
- How can Custom Post Type and a page have the same slug?
- Assign CPT archive page attributes
- How to get postname in custom page?
- Set a hard-coded page-template (post-type-archive) as home/front-page of my wordpress blog?
- Custom taxonomy or custom page templates?
- Dynamically insert an article at the top of a taxonomy archive – or?
- Archiving custom post content?
- archive as a page, so that it can be added in the wp_menu_nav
- Can anyone clarify difference between archive-{posttype}.php, type-{posttype} and date.php?
- Listing all slugs?
- Why WordPress is picking archive.php instead of page.php?
- Changing slug of all posts
- WordPress Custom Post Type – Rewrite Query
- WordPress different templates for same type custom post (but different slug)
- How do I add custom HTML to the content of an archive page’s posts?
- Only show posts with a specific term of an associated taxonomy in a custom post type archive
- Archive links for custom post types
- Show All Custom Post Types On A Single Archive Page
- Use the custom post type archive for taxonomies?
- Custom Post Type Advanced Slug
- How to rewrite custom taxonomy term archive to use THE SAME SLUG/front as CPT
- Automatically update slug with latest title within custom post type [duplicate]
- Custom Post Type setup
- Archive Page for Multiple Custom Post Types
- Apply template by path/slug related to custom post type?
- Can’t access private custom posttype single- or archives-page
- Display Date & Author Info on Custom Post Type Archive Page
- Changing CPT slug and taxonomy already registered in parent theme
- Custom Post Type to replace Woocommerce products – page not found error
- How to constrain the results to a specific post_type on tag archive page?
- Get the link of the first post of a custom taxonomy in a custom taxonomy list
- Custom Post Type for Shortcode Use – Prevent it display as a post (with slug)
- How can I relate custom post types?
- How to use a specific custom field in a custom post type as slug
- Custom Post Types and Removing Slugs – should we do it?
- Dynamic category name in query post
- Custom Post Type Archive Pagination
- How to know which archive page is active
- sort by name (slug) custom post type
- Need to have an archive widget which organizes and displays a custom post type using a custom date field
- Need to return a string as permalink insted of str_replace
- Archive page for custom post type and custom taxonomy
- How to controll the Posts post type and general wondering about WP data structure
- Under What Conditions Can I name my CPT the same as my CPT Page?
- Archive Template being used instead of Category Template for Custom Post Type
- Why does my URL keep returning 404 error code?
- pre_get_posts works in post type archive but not in single post
- Menu’s breaking, now showing all page links on site
- Display CPT index page as front/home page
- How to prevent a custom post type from using the archive.php template?
- Event Archive by Month
- How to have multiple archive pages?
- Create a Custom Path to Archive
- Advanced archive url structure (category, tag and date)
- Custom Post Type Date Based Archive URL rewrite [duplicate]
- How can I allow users to edit text that will be displayed on a custom post type archive page?
- How can I increase the post count for custom post types only?
- How can I tell if I’m on a custom post type archive page?
- Listing authors and date archive from custom post type
- WordPress sitemap with Custom Post Types