Created
March 13, 2019 19:21
-
-
Save alaasalama/6f8b1364e1100b2888f2b005891f3721 to your computer and use it in GitHub Desktop.
Alter the shortcode logic to be AND instead of OR
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Tribe, change tax query relation to AND instead of OR */ | |
function tribe_list_widget_tax_query_relation ( $args ) { | |
// bail if no relation is no tax query | |
if ( !isset( $args['tax_query'] ) ) return $args; | |
$args['tax_query']['relation'] = 'AND'; | |
return $args; | |
} | |
add_filter ( 'tribe_events_list_widget_query_args', 'tribe_list_widget_tax_query_relation', 100 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment