Multiple Archive Pages for Custom Post Types AND Taxonomies

You can create the taxonomy-{$custom_taxonomy}.php that will handle all request for you custom taxonomy, and rely on query string to show events based on month.

The url can change based on your setting, but should be something like this:

http://yourdomain.com/custom-taxonomy/term-a/?month=2013-07

Hooking into pre_get_posts action (search codex) you can modify the query for that taxonomy and using WP_Query custom fields parameters you can show posts in the month required.

To show month as page heading you can use:

$m = isset( $_GET['month'] ) ? substr($_GET['month'], 5, 2) : date('n');
echo date_i18n('F', mktime(12, 0, 0, (int)$m, 1) );

with some logic you can create the link to show next and previous month:

$url = get_term_link( get_queried_object()->term_id, 'your-custom-tax');
$m = isset( $_GET['month'] ) ? substr($_GET['month'],5,2) : date('n');
$y = isset( $_GET['month'] ) ? substr($_GET['month'], 0,4) : date('Y');
$ts = mktime(12, 0, 0, (int)$m, (int)$y, 2);
$next_m_ts = $ts + (30*3600*24);
$prev_m_ts = $ts - (3*3600*24);
$next_url = add_query_arg( array('month' => date('Y-m',  $next_m_ts) ), $url );
$prev_url = add_query_arg( array('month' => date('Y-m',  $prev_m_ts) ), $url );

Hope this can help you, but, please, note that all the code here is not tested.

Leave a Comment