This is a tough question because there are so many possible solutions. 😉
I think the easiest way is to create a custom taxonomy “year” and add it automatically to the CPT post on save using the save_post() hook and wp_set_object_terms().
You could then simply use get_terms() to get a list of years (you’ll only get ones that have concerts by default) and just link to the terms archive by using get_term_link(). You could still use the default CPT archive to show the concerts from the current year.
Related Posts:
- Query all posts where a meta key does not exist
- Exclude a category from WP_Query
- WP_Query orderby custom field then post_date in one query
- Include post id[s] into WP_Query()
- Syntax to get the Nth item in a list of custom post types?
- WP_Query to loop a Custom Field, Custom Post Types do not show
- Pre_get_posts Gives 404 on Custom Post Type
- Sorting a list of posts displayed under a list of associated terms (which should be sorted without initial articles)
- Query for posts from any post type but only add instock products
- Query not returning CPT posts
- Custom Taxonomy and tax_query Issue?
- Unable to display multiple post types in same query (WPML WP_Query)
- WP_Query with custom post_type and cat retrieving unwanted posts with the custom posts
- Query to get the author who having maximum number of post (custom post type)
- Pagination not working
- How to use custom post type APIs, but use a different db table
- Display all Posts and only certain Custom Post Types with meta fields
- Select menu should display categories and the item’s depth
- Custom Post Order for a Custom Post Type
- Show Post Count of a Category
- Why does using WP_Query inside a shortcode in an elementor page cause the arguments for WP_Query to get malformed?
- Filtering by Post Meta Custom Fields – Performance
- WP Query—Relationship between two custom post types and their fields
- Unable to get paginate_links working with a custom query [duplicate]
- Setting proper query for multiple custom admin filters
- Query custom post type with tags
- Custom loop with multiple taxonomy queries
- Isotope Filtering with Bootstrap Tabs – Custom Post Type Query Loop in each Tab (Have to click twice to filter)
- Custom taxonomy rewrite give pagination 404
- WP_Query order by custom field, then randomly order some of results
- creat filter with wp_query
- How to do WP_Query with two meta fields with orderby clause
- Custom query at top of archive search page, arguments are overridden
- How to display post list inside post
- How to have this permalink structure: post_type/postname/custom_inner_page
- Advanced search form with filters for custom taxonomies
- Showing specific post in order of array wp_query
- WP the_posts() on single-cars.php get category link
- tax_query not working in template
- Custom Taxonomy Not Showing in Front-End When Outputting a Custom Post Type with WP_Query()
- Multiple Custom Post Type queries, how to DRY it up
- Custom WP_Query always respond with 200 status even when no entry
- WPDB for post count on post
- post_per_page ignored in WP_Query
- Pagination 404 on Index with custom query
- How to include category name/id in wp_query for retrieving “custom post type” from a particular category?
- Custom post type and standard post not displaying or working
- Get all post from a post type
- Trying to add a class to post links
- A faster way to query custom post types with multiple conditions?
- Custom Post Type Archive Pagination
- List all Custom Post Type posts excluding certain Taxnomy term
- WP_Query: Posts within category OR custom post type
- Two queries – one with checkbox ticked, one without – comparing meta_query
- Custom post type pagination error
- WP query_posts group by meta field related
- posts_per_page in custom WP_Query does not override “Reading” settings?
- Display Parent-Child Posts in specific order by comparing IDs in array
- Apply category query clause to posts of custom type
- custom post type and a “sticky” position taxonomy
- Display post count for a specific month
- WP_query has incorrect wp_posts.post_name = ‘asc’ when I have custom post type called ‘order’
- Randomizing WordPress Custom Post Type Sorting Through Them Without Page Refresh
- Order posts alphabetically with numbers but some of the posts has numbers in the title
- How to sort by multiple values in a nested WP_Query
- SEARCH QUERIES – REVERSE OUTPUT
- WP_Query to display number of custom post type filtered (order by) taxonomy
- 2 modal windows with ACF content on Archive page
- post_type incorrect for custom post type
- Live search by custom tag
- Custom Post Type – Display all, wrap in groups of 3
- Staggering featured post using ‘sticky’
- Ajax load more inside custom post type taxonomy
- How to get the posts that my following users are liked?
- Only show categories that have posts within custom post type
- Create a custom wp_query from a specific custom post type with specific taxonomy
- How can you use a page for a custom post type?
- Display all Custom taxonomy terms and their relevant custom posts
- Query breaking with ‘posts_per_page’ => -1
- WP Query with multiple post types ordered by custom meta date then published date
- CPT Efficient way to display posts from different categories with custom query
- How To Loop Through list with Custom Post Types
- CPT or Custom Table for Repository of Serial Numbers
- Query Pulling the same post twice
- Use Tags to Query Associated Multiple Posts and Get The Average Of Custom Field Values
- Custom Post Type + Category archive
- Values inside a custom field to determine which category posts to display
- Pop up showing same content on all posts display.
- Custom post-type’s pagination not working in category.php
- Listing all custom post types using a specific term on the said term’s template page, in groups
- Querying meta values within an array
- Count of posts with meta_key filled in?
- Filter Custom post type by another Custom post type
- Archive page – problem with pagination
- Are custom posts included when getting a categories’ posts?
- Query order by meta value force specific tag first
- Display ACF object field data using Elementor Custom Query
- WordPress custom field sorting, weird behavior: the latest post is at the end
- Default WordPress Query for a Specific Custom Post Type URL
- Dynamically count the number of custom post types associated to a custom taxonomy