Created
January 8, 2014 07:00
-
-
Save jazbek/8312881 to your computer and use it in GitHub Desktop.
Fix photo view losing the category when paginated
This file contains hidden or 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 | |
add_filter( 'tribe_events_pro_pre_get_posts', 'tribe_fix_photo_category_pagination' ); | |
function tribe_fix_photo_category_pagination( $query ) { | |
// check & set event category | |
if ( isset( $_POST['tribe_event_category'] ) && $query->get( TribeEvents::TAXONOMY ) == '' ) { | |
$query->set( TribeEvents::TAXONOMY, $_POST['tribe_event_category'] ); | |
} | |
return $query; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment