Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Parent-route listing Query Loops are not scoped to their section's posts

Open
#2,885 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
php, wordpress
Domain
content

Research direction

Start in WordPressSitePlan::materializeListingQueryLoops(), where posts are grouped by parent route, and at listingQueryMarkup(), which emits the inherit: false query with no section filter. Trace how postsByParent already proves membership, then decide how to carry it to WordPress (a generated category per parent route with a taxQuery, or another mechanism). Done when a multi-section site's /news/ listing query only returns /news/ posts and single-section output is unchanged. The issue leaves the approach open, so confirm the design with the maintainer first.

Written by the indexing model from the issue text.

Description

Summary

WordPressSitePlan::materializeListingQueryLoops() groups posts by their parent route (/news/<slug>/ belongs to /news/). The Query Loop it emits for a parent-route listing (listingQueryMarkup()) has inherit: false and no section filter, though: postType: post, ordered by date, with nothing else. On a site with more than one post section (for example /news/ and /blog/), each listing page therefore shows the newest posts from every section, not its own.

Observed on a real import: the /news/ listing rendered posts from /blog/ between its own news posts.

The parent-route membership is already proven when the cards are matched (postsByParent). It is not carried to WordPress, as a term, a post-meta key or an include list, so the query cannot reproduce it. Category archives (#2468) carry term membership. Parent-route sections don't.

Expected

When a site has more than one post section, a section listing's Query Loop is scoped to that section's posts. One way is a generated category per parent route with membership on each post, and a taxQuery on the listing query. Single-section sites keep today's output.

Notes

  • Related: #2884. The fix for that issue keeps listings captured when posts still carry their page chrome, which hides this on the site where it was found. It shows again whenever article factoring succeeds for a multi-section site.

AI disclosure: Claude (Anthropic) via Claude Code implemented this under Chris Huber's direction; operator-authorized direct fallback outside Homeboy.

Dominant language
PHP
Stars
21
Forks
2
Avg merge
9h 6m
Merged PRs (30d)
589

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Automattic/blocks-engine

All issues in Automattic/blocks-engine

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.