Skip to content

Instantly share code, notes, and snippets.

@MZAWeb
Created September 13, 2012 20:42
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 MZAWeb/3717480 to your computer and use it in GitHub Desktop.
Save MZAWeb/3717480 to your computer and use it in GitHub Desktop.
add_filter( 'pre_get_posts', 'tribe_pre_get_posts' );
function tribe_pre_get_posts( $query ) {
if ( $query->query_vars["post_type"] === TribeEvents::POSTTYPE ) {
$query = apply_filters( 'tribe_pre_get_posts', $query );
}
return $query;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment