Forums › Forums › Search & Filter Pro › I found a mistake?
- This topic has 3 replies, 2 voices, and was last updated 9 years, 1 month ago by Anonymous.
Viewing 4 posts - 1 through 4 (of 4 total)
-
Ross Moderator(Private) October 6, 2015 at 6:24 pm #26644
Hmm I just tested on mine local version and it seemed ok – but it certainly looks wrong.
It seems like perhaps something is modifying the count queries that are being peformed – are you using
pre_get_posts
anywhere?Can you try again with other plugins disabled?
Thanks
Anonymous(Private) October 6, 2015 at 6:52 pm #26653add_action( 'pre_get_posts', 'et_custom_posts_per_page' ); function et_custom_posts_per_page( $query ) { global $shortname; if ( is_admin() ) return $query; if ( $query->is_category ) { $query->set( 'posts_per_page', get_option( $shortname . '_catnum_posts' ) ); } elseif ( $query->is_tag ) { $query->set( 'posts_per_page', get_option( $shortname . '_tagnum_posts' ) ); } elseif ( $query->is_search ) { if ( isset($_GET['et_searchform_submit']) ) { $postTypes = array(); if ( !isset($_GET['et-inc-posts']) && !isset($_GET['et-inc-pages']) ) $postTypes = array('post'); if ( isset($_GET['et-inc-pages']) ) $postTypes = array('page'); if ( isset($_GET['et-inc-posts']) ) $postTypes[] = 'post'; $query->set( 'post_type', $postTypes ); if ( isset( $_GET['et-month-choice'] ) && $_GET['et-month-choice'] != 'no-choice' ) { $et_year = substr($_GET['et-month-choice'],0,4); $et_month = substr($_GET['et-month-choice'], 4, strlen($_GET['et-month-choice'])-4); $query->set( 'year', absint($et_year) ); $query->set( 'monthnum', absint($et_month) ); } if ( isset( $_GET['et-cat'] ) && $_GET['et-cat'] != 0 ) $query->set( 'cat', absint($_GET['et-cat']) ); } $query->set( 'posts_per_page', get_option( $shortname . '_searchnum_posts' ) ); } elseif ( $query->is_archive ) { $query->set( 'posts_per_page', get_option( $shortname . '_archivenum_posts' ) ); } return $query; }
-
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)