From b1c3d5eccc9761b0867ad3abd06be4a4db4bd8e6 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 27 Oct 2014 02:15:35 +0000 Subject: [PATCH] Don't add 'sticky' class in get_post_class() if 'ignore_sticky_posts' query var is set. props jakub.tyrcha, johneckman. fixes #18035. git-svn-id: https://develop.svn.wordpress.org/trunk@30036 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/post-template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php index b05b6eabee..7145a21d16 100644 --- a/src/wp-includes/post-template.php +++ b/src/wp-includes/post-template.php @@ -437,7 +437,7 @@ function get_post_class( $class = '', $post_id = null ) { // sticky for Sticky Posts if ( is_sticky( $post->ID ) ) { - if ( is_home() && ! is_paged() ) { + if ( is_home() && ! is_paged() && ! get_query_var( 'ignore_sticky_posts' ) ) { $classes[] = 'sticky'; } elseif ( is_admin() ) { $classes[] = 'status-sticky';