Created
May 18, 2017 05:51
-
-
Save GeoffEW/d35003c3b98646e50a715b494be79820 to your computer and use it in GitHub Desktop.
Tribe, remove child recurring events from photo view
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 | |
/* Tribe, remove child recurring events from photo view */ | |
function tribe_set_default_date ( $query ) { | |
if ( tribe_is_photo() ) { | |
$query->set( 'post_parent', '0' ); | |
} | |
} | |
add_action( 'pre_get_posts', 'tribe_set_default_date', 15 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment