From a6e286b3bd5cc6a12a20b06eada7bbd1f2b5c4a8 Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 10 Jun 2011 20:14:59 +0000 Subject: [PATCH] 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 --- wp-content/themes/twentyeleven/inc/widgets.php | 2 +- wp-content/themes/twentyeleven/showcase.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-content/themes/twentyeleven/inc/widgets.php b/wp-content/themes/twentyeleven/inc/widgets.php index 3594a5628..8d8ce4375 100644 --- a/wp-content/themes/twentyeleven/inc/widgets.php +++ b/wp-content/themes/twentyeleven/inc/widgets.php @@ -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( diff --git a/wp-content/themes/twentyeleven/showcase.php b/wp-content/themes/twentyeleven/showcase.php index aeb3bad1a..eae1037df 100644 --- a/wp-content/themes/twentyeleven/showcase.php +++ b/wp-content/themes/twentyeleven/showcase.php @@ -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();