[wp-trac] [WordPress Trac] #43294: Sticky class should be added regardless of where posts are queried

WordPress Trac noreply at wordpress.org
Tue Feb 13 21:58:50 UTC 2018


#43294: Sticky class should be added regardless of where posts are queried
-------------------------------+------------------------------
 Reporter:  Selrond            |       Owner:
     Type:  enhancement        |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:  trunk
 Severity:  normal             |  Resolution:
 Keywords:                     |     Focuses:
-------------------------------+------------------------------

Comment (by Selrond):

 @birgire my issue is really that `.sticky` should be added to sticky posts
 regardless of how they are queried (default query or custom query).

 Current implementation only adds `.sticky` class to sticky posts '''when
 queried from default query''' (due to the `is_home()` check.

 I propose removing `is_home()` check in `post-template.php` which would
 enable adding `.sticky` class to posts queried from custom queries.

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


More information about the wp-trac mailing list