Created
September 23, 2016 23:57
-
-
Save GeoffEW/1070a19b06a35a6abb73098749e9b7b1 to your computer and use it in GitHub Desktop.
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
<?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