Make WordPress Core

Opened 7 months ago

Closed 4 weeks ago

Last modified 4 weeks ago

#64712 closed enhancement (wontfix)

Sticky Posts don't appear at top of Category / Taxonomy pages

Reported by: jordesign Owned by:
Priority: lowest Milestone:
Component: Posts, Post Types Version:
Severity: normal Keywords: close
Cc: Focuses:

Description (last modified by sabernhardt)

Originally opened as a Gutenberg issue:
https://github.com/WordPress/gutenberg/issues/51936

When viewing a category or taxonomy page - Sticky posts are not shown at the top of the list. This appears to be by design.

Yeah, this actually seems to be "as intended", in a way. The WP_Query class will not load sticky posts if you're not is_home. That should be true in classic themes as well. The query loop block takes no action on the query if you leave the default sticky setting, and that's going to have to change.

I think the "Include" sticky setting needs an explicit value set (right now it's value is empty), and that needs to trigger using post__in in some block logic that currently lives in WordPress core.

https://github.com/WordPress/gutenberg/issues/51936#issuecomment-2105414534

It would be good for the sticky settings to be honoured even in these circumstances.

Change History (4)

#1 @knutsp
7 months ago

  • Keywords close added

This would be BC break if just impemented as the default behaviour for all archive pages or just for categories/taxonomy archives.

I suggest exploring a filter, an array with the archive types as key, posts as default true (for honouring sticky posts on the top). Such may, or may not, be included in core.

Or just close this, as concept of sticky posts in core are intended for the posts archive (home). There are already plugins for extending it to other archives https://github.com/wp-plugins/category-sticky-post.

Last edited 7 months ago by knutsp (previous) (diff)

#2 @sabernhardt
7 months ago

  • Description modified (diff)
  • Version trunk

#3 @jordesign
4 weeks ago

  • Priority normallowest
  • Resolutionfixed
  • Status newclosed

Given that the control specifically says it will stick items to the Front Page - this is understandably not a priority to fix so I'm canceling this issue.

#4 @sabernhardt
4 weeks ago

  • Milestone Awaiting Review
  • Resolution fixedwontfix

Switching the resolution to reflect that this is 'not planned' (but it still can be reopened if there is interest later).

Note: See TracTickets for help on using tickets.