Skip to content

Instantly share code, notes, and snippets.

@barryhughes
Forked from anonymous/gist:6601321
Created November 28, 2013 15:00
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 barryhughes/7693226 to your computer and use it in GitHub Desktop.
Save barryhughes/7693226 to your computer and use it in GitHub Desktop.
add_filter( 'tribe_events_pre_get_posts', 'setup_my_bar_field_in_query', 10, 1 );
function setup_my_bar_field_in_query( $query ){
if ( !empty( $_REQUEST['tribe-bar-my-field'] ) ) {
$query->query_vars['my_var'] = $_REQUEST['tribe-bar-my-field'];
}
return $query;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment