Make WordPress Core

Opened 2 weeks ago

Last modified 2 weeks ago

#63365 new defect (bug)

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

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

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.


2 weeks 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.