Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'pre_get_posts', 'my_show_all_on_day_view_function', 10, 1 );
- function my_show_all_on_day_view_function( $query ) {
- if ( $query->is_main_query() && isset( $query->query_vars['eventDisplay'] ) && $query->query_vars['eventDisplay'] == 'day' ) {
- $query->set( 'posts_per_page', '-1' );
- }
- return $query;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement