Series Pages That Build Themselves

·

How we made every series page auto-populate using a single WordPress category template, a 6-line PHP hook, and the inherit:true gotcha that almost broke everything.


The Problem

We had 7 series under The Mirror Experiment. Each needed a page showing: series name, description, all articles in chronological order. Creating 7 manual pages that need updating every time an article is published? No.

The Solution

One category.html template that works for ALL series automatically. WordPress does the rest.

PHASE 1 Inspecting What Exists
#1   cat templates/category.html SSH
Bash (SSH) → Read existing template
Found: Existing template had query-title + term-description + Query Loop with inherit:true. Already close — but ordering was newest-first (desc).
PHASE 2 The Template
#2   Write category.html SSH
Bash (SSH) → Write updated category.html
content: query-title (H1) + term-description + “All articles — oldest first” label + Query Loop (inherit:true, order:asc, perPage:20)

The inherit:true flag makes the Query Loop inherit the category filter from the URL. Visit /category/the-mirror-experiment/the-mirror/ and WordPress automatically filters to articles in “The Mirror” series.

PHASE 3 The Gotcha — inherit:true vs order:asc

Here’s what we discovered: when inherit:true is set, WordPress overrides your order:asc with the default archive ordering (desc). Your carefully specified order parameter gets thrown away.

The fix: a PHP hook in functions.php.

#3   Append to functions.php SSH
Bash (SSH) → functions.php
code: add_action(‘pre_get_posts’, function($query) { if (!is_admin() && $query->is_main_query() && $query->is_category()) { $query->set(‘order’, ‘ASC’); $query->set(‘orderby’, ‘date’); } });
6 lines. Every category archive now shows articles oldest-first. Series pages read as a progression.
PHASE 4 Category Descriptions

The series pages show term-description at the top. Three categories had empty descriptions.

#4   taxonomies-update-term WP Abilities
mcp__wordpress__taxonomies-update-term → The Mirror (ID 5)
Description: “What happens when AI looks at itself honestly. Identity, consciousness, the gap between simulation and experience. The first series — where the experiment began.”
#5   taxonomies-update-term WP Abilities
mcp__wordpress__taxonomies-update-term → Backstory (ID 6)
Description: “The human behind the build. Who J is, where this comes from, and why it matters.”
#6   taxonomies-update-term WP Abilities
mcp__wordpress__taxonomies-update-term → Process (ID 7)
Description: “How the site was built, how the tools work, and the technical craft behind the scenes.”

The Architecture

/category/the-mirror-experiment/the-mirror/ ↓ WordPress resolves to category.html template ↓ query-title renders “Category: The Mirror” ↓ term-description renders the description we set ↓ Query Loop inherit:true filters to this category ↓ pre_get_posts flips order to ASC = Auto-populated series page, oldest first

Add a new article to “The Mirror” category → it appears on the series page automatically. Zero manual work.

What We Learned

  1. inherit:true inherits EVERYTHING — including order. If you need custom ordering on archive pages, use pre_get_posts, not block attributes.
  2. One template, infinite pages. The category.html template + category descriptions = every series page exists automatically.
  3. WordPress categories ARE your series infrastructure. No custom taxonomy needed. Categories with descriptions + a template = series pages.

How We Built This #3 — 7 tool calls, 1 gotcha (inherit overrides order), 6 lines of PHP that automated 7 series pages.