Skip to content

Instantly share code, notes, and snippets.

@GeoffEW
Created September 23, 2016 23:57
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 GeoffEW/1070a19b06a35a6abb73098749e9b7b1 to your computer and use it in GitHub Desktop.
Save GeoffEW/1070a19b06a35a6abb73098749e9b7b1 to your computer and use it in GitHub Desktop.
<?php
if ( class_exists('Tribe__Events__Pro__Mini_Calendar') ) {
function tribe_fix_minicalendar_hide_from_listing_conflict ( $query ) {
if ( has_action( 'pre_get_posts', array( Tribe__Events__Pro__Mini_Calendar::instance(), 'set_count' ) ) ) {
$query->query_vars['eventDisplay'] = 'list';
remove_action( 'pre_get_posts', 'tribe_fix_minicalendar_hide_from_listing_conflict');
}
}
add_action( 'pre_get_posts', 'tribe_fix_minicalendar_hide_from_listing_conflict');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment