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

git-svn-id: http://svn.automattic.com/wordpress/trunk@18239 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2011-06-10 20:14:59 +00:00
parent 262b95b4ad
commit a6e286b3bd
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( $ephemera_args = array(
'order' => 'DESC', 'order' => 'DESC',
'posts_per_page' => $number, 'posts_per_page' => $number,
'nopaging' => 0, 'no_found_rows' => true,
'post_status' => 'publish', 'post_status' => 'publish',
'post__not_in' => get_option( 'sticky_posts' ), 'post__not_in' => get_option( 'sticky_posts' ),
'tax_query' => array( 'tax_query' => array(

View File

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