Make WordPress Core

Opened 19 months ago

Last modified 19 months ago

#63365 new defect (bug)

Sticky Posts Appear at the Top of Every Page in the Query Loop Block

Reported by: karthikeya01 Owned by:
Priority: normal Milestone: Awaiting Review
Component: General Version:
Severity: normal Keywords: has-patch has-unit-tests
Cc: Focuses:

Description

See ​https://github.com/WordPress/gutenberg/issues/69867 (The author closed the issue, but I believe this is a valid bug that needs to be addressed.)

Steps to Reproduce

  1. Create some regular posts and some sticky posts.
  2. Add a Query Loop block to a page.
  3. Visit the frontend of the page and navigate through different pages in the loop.
  4. Observe that sticky posts appear at the top of every page.

​Video

Comment from the GB issue
​https://github.com/WordPress/gutenberg/issues/69867#issuecomment-2796815674

Sticky posts should be limited to the first page, or placed according to their natural order in the post listing. This is the standard and expected behavior from a user perspective. Repeating them on every page has no added value and negatively affects content discovery.

Why it matters:

Reduces content visibility: Newer/non-sticky posts are pushed further down on each page.

Hurts usability: Users must scroll past the same content multiple times.
Wastes space: The repeated sticky content adds no benefit beyond page 1.

Change History (1)

This ticket was mentioned in ​PR #8750 on ​WordPress/wordpress-develop by ​@karthikeya01.


19 months ago
#1

  • Keywords has-patch has-unit-tests added
  • Adds 'paged' var to query if 'perpage' is set.
  • Update unit test to include the 'paged' var.

Trac ticket: https://core.trac.wordpress.org/ticket/63365

Note: See TracTickets for help on using tickets.