Use no_found_rows for some queries. Props pavelevap. fixes #17745

git-svn-id: https://develop.svn.wordpress.org/trunk@18239 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2011-06-10 20:14:59 +00:00
parent 76ddc16e4a
commit 69b5356889
2 changed files with 3 additions and 1 deletions

View File

@ -60,7 +60,7 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
$ephemera_args = array(
'order' => 'DESC',
'posts_per_page' => $number,
'nopaging' => 0,
'no_found_rows' => true,
'post_status' => 'publish',
'post__not_in' => get_option( 'sticky_posts' ),
'tax_query' => array(

View File

@ -49,6 +49,7 @@ get_header(); ?>
'post__in' => $sticky,
'post_status' => 'publish',
'posts_per_page' => 10,
'no_found_rows' => true,
);
// The Featured Posts query.
@ -174,6 +175,7 @@ get_header(); ?>
'operator' => 'NOT IN',
),
),
'no_found_rows' => true,
);
// Our new query for the Recent Posts section.
$recent = new WP_Query();