“pagination” (but not really) and queries using custom posts types

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.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)