[wp-trac] [WordPress Trac] #43294: Sticky class should be added regardless of where posts are queried
WordPress Trac
noreply at wordpress.org
Thu Oct 2 14:18:32 UTC 2025
#43294: Sticky class should be added regardless of where posts are queried
-------------------------------+----------------------
Reporter: Selrond | Owner: (none)
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: Posts, Post Types | Version:
Severity: normal | Resolution: wontfix
Keywords: | Focuses:
-------------------------------+----------------------
Changes (by SirLouen):
* status: new => closed
* resolution: => wontfix
* milestone: Awaiting Review =>
Comment:
As @birgire suggested, this template function is made ad hoc in
combination with `get_posts` for a default behavior. If you want a custom
behavior, there are plenty of hooks where you can give further conditions
to add back the `sticky` classes you never got because of that default
`is_home` condition.
Altering the default condition could cause unexpected variations in pages
that could actually be using sticky styling and at the same time have
other custom styles in places outside of home and custom queries, as you
are proposing.
For this reason, this cannot be fixed that trivially, and there is a clear
workaround, not hard to apply.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43294#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list