You can have a separate slug for the post type archive by setting the slug as the value for the has_archive
argument, instead of just true
:
register_post_type(
'event',
array(
'has_archive' => 'agenda',
// etc.
)
);
Now you can use single-event.php
and archive-event.php
for the single and archive views, but the URL for the archive will be siteurl.com/agenda
.
Related Posts:
- Rewrite Custom Post Type URL slug
- Custom post type and taxonomy permalinks – Structure
- Show index and not the archive for “Dog Custom Post” with default slug
- URL Rewrite Adjustment for Custom Post Type causes template to revert to index.php
- Custom Post Type URL Rewriting?
- Custom Post Type Settings page, choose page to display archive
- How to pass URL parameters for advanced taxonomy queries with multiple terms for one custom taxonomy
- Custom post types – Use post_id in permalink structure when using has_archive => true
- Slug for custom post type archive
- Change page /2 to /transcript with a Rewrite
- Permalink rewrite with custom post type and custom taxonomy
- Make permalinks based on an ACF-field
- How would I leverage custom Taxonomies in this scenario?
- WordPress returns 404 on custom rewrite rule conflict in parameters
- Custom Post Type with Nested Taxonomy and Template Files
- How to create download links based on Custom Fields with Rewrite API
- Pagination problems with multiple custom post type archive pages
- Multiple Permalinks for custom post type post
- WordPress Rewrite rule for nested post types
- Is slug “type” reserved and can’t be used in taxonomy rewrite?
- Custom Post Type get_post_type_archive_link( $post_type ) returns false
- WordPress custom post type archive with description
- CPT: archive-cpt.php VS custom page template
- Permalinks when filtering multiple custom post types by single taxonomy
- custom taxonomy archive by year
- How to Combine Two Custom Post Types into Single Permalink Structure
- Redirecting when changing custom post type slugs?
- How to remove slugs from multiple custom post types
- Archive template for custom post type only lists first 10
- Custom taxonomy in URL showing 404
- Rewrite slug of custom post type to include post-id
- Rewrite rules for custom posts types
- How to change custom post type permalink structure
- Front custom edit post page for each post
- Categories of Custom Post throws gives 404
- How to build custom route by adding taxonomies to URL ? ex: www.demo.com/communities/palo-alto/
- How Can I Change the Custom Post Type Slug to the Taxonomy Slug in the URL?
- Use same slug base for Custom Post Type posts, and multiple taxonomy terms
- Rewrite Question Mark in Post Template to Make it Pretty URL
- Index page with the same id as the slug
- redirect automatic page that serves custom posttype content
- URL rewrite add author as base
- Custom post type archive page blank
- How do I check if the user is on a taxonomy term parent, child or grandchild page?
- WordPress custom post type split into pages
- CPT Template Not Showing – Getting 404
- Including taxonomy term before post type breaks top level pages
- Correct procedure for advanced permalinks
- Custom Post Types hierarchy and rewrite
- How to get list of taxonomy slugs ordered parents>childs?
- Rewrite Endpoints and CPTs – How to use in a plugin
- Custom post type’s permalink adds the name of the post type before the post name
- Custom taxonomy and post type with same slug
- Best way to specify “article type” in URL
- Which Template Page Should I Use?
- Custom Empty Results page for my Custom Post Type
- Pagination doesn’t function properly for archive of a custom post type set as the front page
- I can’t access custom taxonomy page listing
- How to have permalink like domain.com/term/postname?
- Combine multiple CPT names to create valid permalinks
- How to rewrite custom taxonomy term archive to use THE SAME SLUG/front as CPT
- How to create custom search result page with custom URL parameters for custom post type?
- Page inside custom post type (url rewrite?)
- rewriterule not working
- Custom post type URL
- Custom Post Type View Button in Admin Gives 400 Error
- Custom Post Type URL Rewrite’s
- Why does my URL keep returning 404 error code?
- Custom Post Type nest under a normal WordPress Page
- restricting custom rewrite to just one custom post type
- Archive page of taxonomy returns a 404 error
- Rewrite URL for CPT to domain/post-name/post-id
- How to apply multiple rewrite_rule to a single custom post type url?
- Remove custom permalink base from CPT custom category and custom tags
- How to change URL for custom post type archive?
- How to handle this wordpress custom post type rewrite problem?
- Custom permalink structure for custom post types including multiple taxonomy
- How can I assign multiple parents to CPT?
- CPTs relationship
- Rewrite url for custom post type with specific url
- Customise Permalink Structure For Custom Post Types
- Templating advice sub posts of a CTP
- How to use a custom post type as child of a particular post of another CPT?
- How to make “single post” permalink maintain it’s sub-page structure
- Two CPT: one is using part of the custom rewrite slug from the other
- Different taxonomy.php for different custom post types
- Rewrite Endpoint Url without ? before endpoint
- How do I make my archive page look like popular reviewing sites (e.g., Polygon and Gamespot) [closed]
- How Can a CPT in WordPress have a page 2 without an error?
- Remove sequential number from permalinks
- Customizing the custom post type permalink
- Parent cpt/child custom post type URL permalink relationship
- Rewrite Rule & Regex – Extract ‘cat-name’ and ‘page-number’ from http://domain.com/custom-post-type/category/cat-name/page/page-number
- Generate daily archive whenever any post type is added
- How to change custom post type slug without damage seo? [closed]
- Custom taxonomy meta fields
- How to rewrite custom slugs that follow my rules
- Custom post type with custom taxonomies structure url not working archive of CPT
- What is the best way to relate different custom post types?
- Allow child pages with the same base as the CPT slug