Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // CONTROL THE EVENT PAGES AND MANAGE THE ACCESS PERMISSIONS
- // trick to avoid issues with future events
- add_filter( 'posts_results', 'bc_future_events_hack', null, 2 );
- function bc_future_events_hack( $posts, &$query ) {
- if(!is_array($posts) || !isset($posts[0])) {return $posts;} // this was returning false but in the case where $posts is an empty array that is incorrect, so just return $posts
- ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement