Skip to content

Instantly share code, notes, and snippets.

@CRSnyder
Created March 1, 2014 06:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CRSnyder/ec43d2fa72c2aabf92df to your computer and use it in GitHub Desktop.
Save CRSnyder/ec43d2fa72c2aabf92df to your computer and use it in GitHub Desktop.
<?php
if ( is_tag() ) {
$term_id = get_query_var('tag_id');
$taxonomy = 'post_tag';
$args ='include=' . $term_id;
$terms = get_terms( $taxonomy, $args );
$tag_slug = $terms[0]->slug;
}
global $post;
$all_events = tribe_get_events ("tag=$tag_slug");
foreach ( $all_events as $post ) :
setup_postdata ( $post );
//reports errors and prints out month for
//each post.
tribe_events_list_the_date_headers();
endforeach; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment