ceil() max_num_pages. Props MattRead. fixes #3368
git-svn-id: http://svn.automattic.com/wordpress/trunk@4488 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
92421de747
commit
422b5cd65c
|
@ -980,7 +980,7 @@ class WP_Query {
|
|||
$this->posts = $wpdb->get_results($this->request);
|
||||
if ( !empty($limits) ) {
|
||||
$this->found_posts = $wpdb->get_var('SELECT FOUND_ROWS()');
|
||||
$this->max_num_pages = $this->found_posts / $q['posts_per_page'];
|
||||
$this->max_num_pages = ceil($this->found_posts / $q['posts_per_page']);
|
||||
}
|
||||
// Check post status to determine if post should be displayed.
|
||||
if ( !empty($this->posts) && ($this->is_single || $this->is_page) ) {
|
||||
|
|
Loading…
Reference in New Issue