[wp-trac] [WordPress Trac] #18035: ignore_sticky_posts fails to remove sticky class

WordPress Trac noreply at wordpress.org
Tue Dec 16 10:18:56 UTC 2014


#18035: ignore_sticky_posts fails to remove sticky class
--------------------------------------+-------------------------
 Reporter:  mikkelbreum               |       Owner:  johneckman
     Type:  enhancement               |      Status:  reopened
 Priority:  normal                    |   Milestone:  4.1
Component:  Query                     |     Version:  3.2
 Severity:  normal                    |  Resolution:
 Keywords:  good-first-bug has-patch  |     Focuses:  template
--------------------------------------+-------------------------

Comment (by ankit.gade@…):

 Replying to [comment:17 nacin]:
 > I don't remember where (Twitter?) but I've seen a bug report related to
 the sticky class no longer appearing in 4.1.
 >
 > I am trying to think how this could break things, but I bet it does,
 despite it looking harmless. Secondary loops, queries that deliberately
 splice sticky_posts and put it into `post__in` because the client stuck a
 few thousand posts (classic markjaquith rant), etc.

 We have to determine that if current query is main query or query for
 secondary loop. We can add class sticky in following couple of situations.

 1. If query is main query and ignore_sticky_posts parameter is not set in
 the query.

 2. If query is for secondary loop only.

 Still, I am wondering when there is a check for is_home(), how could it
 break the things !

--
Ticket URL: <https://core.trac.wordpress.org/ticket/18035#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list