Here’s the solution:
- Install Custom Post Type Archives plugin
- Go to Settings->Post Type Archives
- Remove the url base option (leave it blank)
- Change the template pattern to
archive-{POST_TYPE}.php
- Tick your custom post type and click save
- Rewrite/save your custom permalink structure
Now your links press-release/%year%
and press-release/%year%/%month%
should work.
Related Posts:
- Meta_Query as a way how to setup CPT permalinks – is it a good thing?
- How to have a dynamic slug and rendering the archive-{post_type}.php?
- Custom Post Type Archives by Year & Month?
- Get custom post type slug for an archive page
- Permalink Structure for Multiple Post Type Archives by Taxonomy
- Custom Post Type Archives by Date and Taxonomy
- Custom post types – Use post_id in permalink structure when using has_archive => true
- Proper way of making custom post type landing page or archive page
- Change title in head on Archive page
- Custom Post Type Archives with 0 Posts Redirects as 404
- Create permalink structure for one taxonomy archive per custom post type
- Page is defaulting to archive page and not designated template
- Better to use a post type archive, page template, or shortcode for generating a highly configurable CPT archive?
- Custom Post Type Archives by Date (stored as meta value) WP3.1
- Custom Permalinks for Custom post Type Archives?
- paginate function in archive for custom-post-type
- Custom post type archive sorted and grouped by date in post meta field
- How to create archive page for taxonomy terms within custom post type
- WordPress custom post type archive with description
- Custom-post-type-archive: posts sorted/filtered by year?
- How to list custom post types?
- Custom post type archive page pagination
- Editable content on a Custom Archive page
- Second Custom Post Type Archive
- How do I get the permalink structure to work like this?
- is_main_query() not working for WP REST API
- CPT Archive with core Category
- Custom template won’t load for a custom post type (custom permalinks used)
- Changing number of posts per page on CPT-archive.php, have tried 20-30 code chunks so far
- get the custom post type title/name
- Tag Archive for Custom-Post-Type Posts yielding 404 when permalinks set to postname
- URL of a custom post type’s post format archive?
- Create template for taxonomy results limited by Custom Post Type
- Custom post type archive page blank
- How to display custom post in archive section of the wordpress page?
- Custom post type archive pagination 404
- Ignoring slug capitalization on rewrite rule for custom post type archive page
- Problems with 404, .htaccess, permalinks and WordPress custom posts locally on Snow Leopard
- What’s the name of the custom post type yearly archive template?
- How to hyperlink content from archive page with custom post-type
- How can I use archive-{post_type}.php theme template?
- Return the name of the post type
- Can anyone clarify difference between archive-{posttype}.php, type-{posttype} and date.php?
- Permalink problems with custom post type and custom taxonomy
- Use the custom post type archive for taxonomies?
- Custom Post Type Archive template not being called
- Custom Post Type with Configurable Sidebar via ACF
- Archive page for custom post type and custom taxonomy
- Custom post type category permalinks and archive pages
- Pagination does not work on Custom Post Type archive while trying to get load more function working
- How to have multiple archive pages?
- Create a Custom Path to Archive
- Custom Post Type Date Based Archive URL rewrite [duplicate]
- WordPress sitemap with Custom Post Types
- Is possible register two archive pages for single custom post type?
- Finding the CPT archive template source
- Custom Post type page content (archive page)
- Group custom post type posts by month
- Creating an archive page or simple template to list all values of a custom field of specific post type listing
- Do not show child pages within a file page
- Tell wordpress to show a single page instead of an archive page
- Permalink for custom post type pages not working
- Custom Post Type archive page listing a 404 or single post
- How can i remove post type archive URL?
- Custom post type URL structure with site.com/custom_taxonomy_slug/post_name
- Want to display my custom date archive to date.php but dont know how
- Custom taxonomy in custom post type archive with pagination
- Rewriting archive page slug to be different than custom post type slug
- Site loads very slow for archive custom post type page
- Stop Custom post type from being searched via URL
- Permalink of custom post type partly broken
- Custom Post Type Archive Links Not Working
- Have two (permalinks) urls for a same custom post type
- Custom post type category page not working
- paging is not working properly on news archives page [duplicate]
- How can I set up the URL for a category archive for a custom post type?
- Is it possible to remove the word “date” from archives?
- Taxonomy Query of Custom Post Displays Archive Instead of Posts
- Custom post types not using archive structure
- Pagination not working for archive
- Remove plugin’s custom post type archive page and single pages [closed]
- WordPress CPT archive page display sticky post first and then display the rest of the posts in same Query
- Rewrite custom post type rss feed links
- Display Editable Text Above CPT Archive Listings
- “Edit” option for custom post types archive page
- Remove Slug from Custom Post Type results in 404
- WordPress rewrite my URL when i use pagination
- How can I give CPT archive correct body class?
- custom post type parsed as attachment
- How to add rewrite rule to custom post type with parent in url with cpt ui?
- How to change permalink to include custom post type
- Custom Post Type “MUST NOT” be able to search via URL
- One Custom Post Type two different Templates
- Template hierarchy changes when custom post-type permalink leverages custom taxonomy
- the_permalink() leads back to homepage
- Can’t make permalink of CPT work
- Issue with permalinks for custom post type
- Category / Custom Post Type permalink issue
- is_singular won’t call my functions?
- Linking from a list of custom post type items to a single – get_post_permalink not working correctly