fix: make topics reachable and stop the head fighting itself

Every topic archive rendered its character art gate against the design
master, which package-theme.sh deliberately strips, so production showed
an empty stage on all eight of them. Gate on the derivative the markup
actually loads instead.

Nothing linked to a topic archive: the only filter was a select inside a
form, invisible to crawlers and to anyone not looking for it. The stream
now also lists the non-empty topics as links, marking the current one.
Empty topics stay out, because a dead archive is worse than no link.

Rank Math already owns the document head, so the theme's own og: tags
were a second, conflicting set and core's title tag was a literal
duplicate. Both now yield when an SEO plugin is active.

Category archives listed the same posts as their topic at a second
indexable URL. They now redirect to the same-slug topic, or the Journal.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
chrnxandClaude Opus 5 committed 2026-08-14 08:43:16 -05:00
1 parent 8a47b30316
commit f9191a18bc
28 files changed
+165 -25

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "chrnx/featured-stories",
"version": "0.3.0",
"version": "0.4.0",
"title": "Featured Stories",
"category": "theme",
"description": "A sticky-led selection of topic-diverse stories.",
+1 -1
View File
@@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "chrnx/footer-content",
"version": "0.3.0",
"version": "0.4.0",
"title": "CHRNX Footer Content",
"category": "theme",
"description": "Display translated internal footer navigation and site credit.",
+1 -1
View File
@@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "chrnx/header-tools",
"version": "0.3.0",
"version": "0.4.0",
"title": "CHRNX Header Tools",
"category": "theme",
"description": "Display translated primary navigation and progressive site search.",
+1 -1
View File
@@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "chrnx/journal-link",
"version": "0.3.0",
"version": "0.4.0",
"title": "Journal Link",
"category": "theme",
"description": "Display a translated portable link to the full Journal.",
+1 -1
View File
@@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "chrnx/journal-stream",
"version": "0.3.0",
"version": "0.4.0",
"title": "Journal Stream",
"category": "theme",
"description": "The filterable chronological journal.",
+31
View File
@@ -29,6 +29,37 @@ $chrnx_title = null !== $chrnx_pinned_term ? $chrnx_pinned_term->name : __( 'Jou
?>
<section <?php echo get_block_wrapper_attributes( array( 'class' => 'chrnx-journal-stream' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> aria-labelledby="<?php echo esc_attr( $chrnx_title_id ); ?>">
<h<?php echo esc_attr( $chrnx_heading ); ?> id="<?php echo esc_attr( $chrnx_title_id ); ?>"><?php echo esc_html( $chrnx_title ); ?></h<?php echo esc_attr( $chrnx_heading ); ?>>
<?php
/*
* The select below is invisible to crawlers and to anyone not hunting for it.
* These are the same filters as real links, so topics have an entry point.
* Empty topics stay hidden: a dead archive is worse than no link.
*/
$chrnx_topic_terms = get_terms(
array(
'taxonomy' => 'chrnx_topic',
'hide_empty' => true,
)
);
$chrnx_topic_terms = is_wp_error( $chrnx_topic_terms ) ? array() : $chrnx_topic_terms;
?>
<?php if ( count( $chrnx_topic_terms ) > 1 ) : ?>
<nav class="chrnx-journal-stream__topics" aria-label="<?php echo esc_attr__( 'Topics', 'chrnx' ); ?>">
<ul>
<li>
<a class="chrnx-journal-stream__topic" href="<?php echo esc_url( chrnx_get_full_journal_url() ); ?>"<?php echo '' === $chrnx_topic ? ' aria-current="page"' : ''; ?>><?php echo esc_html__( 'All', 'chrnx' ); ?></a>
</li>
<?php foreach ( $chrnx_topic_terms as $chrnx_term ) : ?>
<?php $chrnx_term_link = get_term_link( $chrnx_term ); ?>
<?php if ( ! is_wp_error( $chrnx_term_link ) ) : ?>
<li>
<a class="chrnx-journal-stream__topic" href="<?php echo esc_url( $chrnx_term_link ); ?>"<?php echo $chrnx_topic === $chrnx_term->slug ? ' aria-current="page"' : ''; ?>><?php echo esc_html( $chrnx_term->name ); ?></a>
</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
</nav>
<?php endif; ?>
<form class="chrnx-journal-stream__filters" method="get" action="<?php echo esc_url( $chrnx_form_url ); ?>">
<?php if ( isset( $chrnx_fixed['taxonomy'] ) && 'chrnx_topic' === $chrnx_fixed['taxonomy'] ) : ?>
<p class="chrnx-journal-stream__fixed-filter"><span><?php echo esc_html__( 'Topic', 'chrnx' ); ?></span> <strong><?php echo esc_html( $chrnx_fixed['label'] ); ?></strong></p>
+9
View File
@@ -1,3 +1,12 @@
.chrnx-journal-stream__topics ul {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
list-style: none;
padding: 0;
margin: 0;
}
.chrnx-journal-stream__filters {
display: flex;
flex-wrap: wrap;
+1 -1
View File
@@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "chrnx/latest-podcast",
"version": "0.3.0",
"version": "0.4.0",
"title": "Latest Podcast",
"category": "theme",
"description": "A linked card for the latest podcast episode.",
+1 -1
View File
@@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "chrnx/mobile-menu-toggle",
"version": "0.3.0",
"version": "0.4.0",
"title": "CHRNX Mobile Menu Toggle",
"category": "theme",
"description": "Progressively reveal the primary navigation on small screens.",
+1 -1
View File
@@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "chrnx/podcast-meta",
"version": "0.3.0",
"version": "0.4.0",
"title": "Podcast Metadata",
"category": "theme",
"description": "Safe episode details for the current post.",
+1 -1
View File
@@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "chrnx/reading-time",
"version": "0.3.0",
"version": "0.4.0",
"title": "Reading Time",
"category": "theme",
"description": "Display a localized estimate based on the current post content.",
+1 -1
View File
@@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "chrnx/related-posts",
"version": "0.3.0",
"version": "0.4.0",
"title": "Related Posts",
"category": "theme",
"description": "Related stories selected by topic, tags, and recency.",
+1 -1
View File
@@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "chrnx/release-detail",
"version": "0.3.0",
"version": "0.4.0",
"title": "Release Detail",
"category": "theme",
"description": "Album cover, listening links, and the ordered tracklist.",
+1 -1
View File
@@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "chrnx/release-list",
"version": "0.3.0",
"version": "0.4.0",
"title": "Release List",
"category": "theme",
"description": "The No Names releases, each linking to its album page.",
+1 -1
View File
@@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "chrnx/selected-work",
"version": "0.3.0",
"version": "0.4.0",
"title": "Selected Work",
"category": "theme",
"description": "Hand-picked projects first, then the most recent ones.",
+1 -1
View File
@@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "chrnx/show-links",
"version": "0.3.0",
"version": "0.4.0",
"title": "Show Links",
"category": "theme",
"description": "Where a podcast show can be listened to, rendered only when a URL exists.",
+1 -1
View File
@@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "chrnx/site-brand",
"version": "0.3.0",
"version": "0.4.0",
"title": "CHRNX Site Brand",
"category": "theme",
"description": "Display the local CHRNX wordmark linked to the site home.",
+1 -1
View File
@@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "chrnx/subscribe-cta",
"version": "0.3.0",
"version": "0.4.0",
"title": "Subscribe CTA",
"category": "theme",
"description": "A call to action linked to the configured subscribe page.",
+1 -1
View File
@@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "chrnx/subscribe-form",
"version": "0.3.0",
"version": "0.4.0",
"title": "Subscribe Form",
"category": "theme",
"description": "The email subscription form, rendered only when a provider endpoint is configured.",
+1 -1
View File
@@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "chrnx/theme-toggle",
"version": "0.3.0",
"version": "0.4.0",
"title": "Theme Toggle",
"category": "theme",
"description": "Choose a light, dark, or system color theme.",
+1 -1
View File
@@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "chrnx/topic-hero",
"version": "0.3.0",
"version": "0.4.0",
"title": "Topic Hero",
"category": "theme",
"description": "A fixed-art hero for an editorial topic.",
+8 -1
View File
@@ -22,7 +22,14 @@ $chrnx_art_topic = 'chrnx_show' === $chrnx_taxonomy ? 'podcasts' : $chrnx_topic;
$chrnx_asset = chrnx_get_topic_art_asset( $chrnx_art_topic );
$chrnx_size = chrnx_get_topic_art_dimensions( $chrnx_art_topic );
$chrnx_has_art = '' !== $chrnx_asset && 2 === count( $chrnx_size );
$chrnx_has_image = $chrnx_has_art && is_readable( get_theme_file_path( $chrnx_asset ) );
/*
* The packaged theme ships only assets/images/generated, so the design master
* is absent in production and gating on it hid the art on every topic archive.
* Check the derivative the markup actually loads.
*/
$chrnx_has_image = $chrnx_has_art && is_readable(
get_theme_file_path( 'assets/images/generated/' . pathinfo( $chrnx_asset, PATHINFO_FILENAME ) . '-768.webp' )
);
$chrnx_heading = chrnx_get_heading_level( $attributes['headingLevel'] ?? 2, 2 );
$chrnx_term = $chrnx_queried instanceof WP_Term && $chrnx_queried->slug === $chrnx_topic ? $chrnx_queried : get_term_by( 'slug', $chrnx_topic, 'chrnx_topic' );
$chrnx_label = $chrnx_term instanceof WP_Term ? $chrnx_term->name : ucwords( str_replace( '-', ' ', $chrnx_topic ) );
+1 -1
View File
@@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "chrnx/track-meta",
"version": "0.3.0",
"version": "0.4.0",
"title": "Track Meta",
"category": "theme",
"description": "Player, listening links, and album for one song.",