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
- Theme localization of “slugs” (custom post types, taxonomies)
- Adding content to archive and taxonomy pages on custom post types?
- Permalink Structure for Multiple Post Type Archives by Taxonomy
- How do I get a post (page or CPT) ID from a title or slug?
- Meta_Query as a way how to setup CPT permalinks – is it a good thing?
- $query->set in pre_get_posts is unintentionally affecting the backend
- Pagination throws 404 error on custom taxonomy archive pages
- Using Custom Fields in Custom Post Type URL
- Setting up custom post type archives in WP3.1? Any luck?
- Custom Post Type Archive Page: Set Posts Per Page, Paginate
- How to show more posts on an archive page?
- Post slug changed using code doesn’t reflect on editor when post is published
- Display all custom post types in archives.php
- How to Add Pages Under Custom Post Type URL Structure?
- Custom Post Type Archives by Date (stored as meta value) WP3.1
- Reslug a Custom Post Type
- Multiple post types in archives (filter?)
- How to let custom post type posts show in standard post archive (like in homepage)?
- Getting Post ID from slug during init
- Include Custom Posts Type in Year/Month/Date Archive
- where can I see my custom post type archive template?
- Custom post type’s slug gets wrong when adding a custom meta box
- Custom post type archive sorted and grouped by date in post meta field
- Can’t edit Custom Post Type slug/permalink
- Custom Permalink with Dynamic Taxonomy for Custom Post Type – Works, but breaks other permalinks
- Custom-post-type-archive: posts sorted/filtered by year?
- Custom Post Type with two hierarchical Custom Taxonomies: strategy to generate best permalink structure
- Custom Post Types and archives
- Custom post type with slug for plural (archive) and for single
- Automaticly add slug to posts
- How to get “custom post type”-archive with working permalink to it?
- Does WordPress limit the length of slug names for Post Meta or Terms?
- Custom template page with custom archives listing by user
- Changing number of posts per page on CPT-archive.php, have tried 20-30 code chunks so far
- Root slug of taxonomy returning 404
- How to modify archive query with pre_get_posts to append CPTs?
- CPT custom archive template does not get loaded
- Am I using the flush_rewrite_rules function in the right place?
- Child post with numeric only slug keeps redirecting to parent
- How to add a post slug to a url?
- Change CPT archive title
- Allow duplicate slugs for custom post type with taxonomies
- Nested Custom Post Type or Custom Post Type Parents?
- The loop seems stuck to a single (now deleted) post
- Use “archive” as slug for custom post type
- Custom post type posts don’t show in archive widget
- Archive for a Taxonomy of a Custom Post type
- How do you create %post_type%/%postname%/ permalink structure?
- Slug Confusion Between Post and Custom Post types?
- Different slug taxonomy for two different CPT
- Taxonomy archive 404ing (not term archive)
- Return the name of the post type
- archive as a page, so that it can be added in the wp_menu_nav
- Custom Post Type setup
- Changing CPT slug and taxonomy already registered in parent theme
- Custom Post Types and Removing Slugs – should we do it?
- Dynamic category name in query post
- Custom Post Type Archive Pagination
- 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 Template being used instead of Category Template for Custom Post Type
- pre_get_posts works in post type archive but not in single post
- Menu’s breaking, now showing all page links on site
- 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?
- Is possible register two archive pages for single custom post type?
- users post count
- Custom post type and multi taxonomies + customize url
- Use custom post type taxonomy between cpt slug and name
- Custom Post Type Archive Page showing as 404
- Show code dependant on CPT & category
- Custom Post Type archive page listing a 404 or single post
- The page or ad listing you are trying to reach no longer exists or has expired
- One of my headings is mysteriously coming up as a link in my CPT Archive
- Custom Post Type duplicating slug for new posts
- WordPress page not showing up – replaced with last 10 posts?
- I broke it! Custom post type archive gets redirected to home
- Display a Custom Post Type within another with hierarchically slug
- Custom nav menu current item custom link problem
- Generate slug and meta data if meta field is empty
- Stop Custom post type from being searched via URL
- archive-{custom_post_type}.php not getting recognized wordpress
- Custom Post Types Archives and daily/monthly joke
- Custom Post Type Rewrite Rule
- How can I retrieve the slug for a custom post type via name?
- WP Query WordPress Post Type with the same Taxonomy name
- Display results from two Custom Post Types in page template
- Ideal top-level slug methods
- How to make a list of posts displaying them 5 by 5 with a “next posts” link?
- Query Custom Post Type and sort by year
- Custom post types not using archive structure
- Pagination not working for archive
- Create page using same slug as custom post type
- Show custom category archive as front page and remove taxonomy slug from urls