The register_post_type has_archive option also accepts a string. That string will be used for the archives. See the changes in the code below:
function create_reviews_post_type() {
register_post_type('acme_reviews', array(
'labels' => array(
'name' => __('Reviews'),
'singular_name' => __('Review')
),
'menu_position' => 5,
'public' => true,
'has_archive' => 'reviews',
);
}
add_action('init', 'create_reviews_post_type');
Related Posts:
- Adding content to archive and taxonomy pages on custom post types?
- Permalink Structure for Multiple Post Type Archives by Taxonomy
- Displaying category archive of custom post types
- 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
- Setting up custom post type archives in WP3.1? Any luck?
- Filter for “get_post_type_archive_link()”
- Custom Post Type Archive Page: Set Posts Per Page, Paginate
- How to show more posts on an archive page?
- Create permalink structure for one taxonomy archive per custom post type
- Custom Post Type Archive URL takes over page URL
- Better to use a post type archive, page template, or shortcode for generating a highly configurable CPT archive?
- 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
- Custom post type tag archives don’t work for basic loop?
- Removing CPT slug from URL results in 404 error for archive page
- Multiple post types in archives (filter?)
- How to let custom post type posts show in standard post archive (like in homepage)?
- Include Custom Posts Type in Year/Month/Date Archive
- where can I see my custom post type archive template?
- Disable single pages and archives and keep preview
- Custom post type archive sorted and grouped by date in post meta field
- Custom post type with tags
- List custom post type but redirects to home page
- Custom-post-type-archive: posts sorted/filtered by year?
- Custom post type archive page pagination
- Custom Post Types and archives
- Need post_type_archive_title function but in ‘single’
- How to get “custom post type”-archive with working permalink to it?
- Custom post types archive redirect
- just can’t get date-based archives per post-type to work
- 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?
- Change CPT archive title
- How to get post type and month/year before while loop for date.php file
- Custom archive page for CPT UI
- How to display custom post in archive section of the wordpress page?
- The loop seems stuck to a single (now deleted) post
- Use “archive” as slug for custom post type
- How can I get this request to use the Custom Post Type page template instead?
- Archive not sorting correctly
- What’s the name of the custom post type yearly archive template?
- multiple custom post type on category page
- How can I use archive-{post_type}.php theme template?
- Taxonomy archive 404ing (not term archive)
- Assign CPT archive page attributes
- Custom taxonomy or custom page templates?
- Can anyone clarify difference between archive-{posttype}.php, type-{posttype} and date.php?
- 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
- Use the custom post type archive for taxonomies?
- Custom Post Type setup
- Display Date & Author Info on Custom Post Type Archive Page
- How to constrain the results to a specific post_type on tag archive page?
- Need to have an archive widget which organizes and displays a custom post type using a custom date field
- pre_get_posts works in post type archive but not in single post
- Menu’s breaking, now showing all page links on site
- How to prevent a custom post type from using the archive.php template?
- Custom Post Type Date Based Archive URL rewrite [duplicate]
- How can I tell if I’m on a custom post type archive page?
- users post count
- Custom Post type page content (archive page)
- Set up Custom Taxonomy Archive Template File To Cover 3 Categories
- Group custom post type posts by month
- Custom WordPress theme not displaying posts from category
- Creating an archive page or simple template to list all values of a custom field of specific post type listing
- Custom post types not showing on the standard WordPress Category page
- Custom Post Type archive page listing a 404 or single post
- Turning archive templates to a page template maintaining the slug
- Order archive custom posts by taxonomy term [duplicate]
- Custom post type pagination problem – page 1 and 2 show same content
- Custom Archive – hide posts until a search is made?
- 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
- I broke it! Custom post type archive gets redirected to home
- Custom Post Type tag taxonomy “Page Not Found”
- Custom Post type archives / categories give 404
- Archive.php is not displaying tags
- Custom post type category page not working
- Custom post types with date based archive
- Custom Post Types Archives and daily/monthly joke
- paging is not working properly on news archives page [duplicate]
- Categories in custom post types
- How to make a list of posts displaying them 5 by 5 with a “next posts” link?
- is_singular won’t call my functions?
- Query Custom Post Type and sort by year
- Custom post types not using archive structure
- How to turn custom-post archive into an overview page, listing the metadata of the posts?
- how to pass args for archive.php query?
- How to have a dynamic slug and rendering the archive-{post_type}.php?
- Remove plugin’s custom post type archive page and single pages [closed]
- WP Query + custom fields: How to query event posts from the current date backwards 6 months and organize it month by month?
- WordPress CPT archive page display sticky post first and then display the rest of the posts in same Query
- Remove date rewrite rule for custom post type archive page
- Taxonomy term archive claims there are no posts, but there are. How to resolve?
- Custom Taxonomy archive with url parameters