diff --git a/CHANGELOG.md b/CHANGELOG.md index e9ec09c..7e6a1f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Peptide Starter Theme - Changelog +## [2.0.0-alpha.2] - 2026-04-26 — Wire verdict card and disclosure into single-peptide.php + +### Fixed +- `single-peptide.php`: Verdict card component was created in alpha.1 but never called + from the template — no verdict state was rendering on any peptide page. Now called + immediately after the page header for all `pr_peptide` posts with a `verdict_state`. +- `single-peptide.php`: Affiliate disclosure (inline context) was created in alpha.1 but + never called. Now rendered directly after the content box (below `the_content()`), + ensuring it appears below any partner links in the post body per the editorial + disclosure spec. +- `single-peptide.php`: Duplicate `

` issue — the page header was rendering an H1 + title AND the verdict card was also rendering an H1. Fixed: page header H1 is now + suppressed when a `verdict_state` is set; the verdict card owns the H1 for monograph + posts. + + All notable changes to the Peptide Starter Theme are documented in this file. ## [2.0.0-alpha.1] - 2026-04-26 — Brand Identity v1.0.0 (Direction C: Trusted Guide) diff --git a/functions.php b/functions.php index 2335968..08df239 100644 --- a/functions.php +++ b/functions.php @@ -26,7 +26,7 @@ if ( ! defined( 'ABSPATH' ) ) { } // Theme constants. -define( 'PEPTIDE_STARTER_VERSION', '2.0.0-alpha.1' ); +define( 'PEPTIDE_STARTER_VERSION', '2.0.0-alpha.2' ); define( 'PEPTIDE_STARTER_DIR', get_template_directory() ); define( 'PEPTIDE_STARTER_URI', get_template_directory_uri() ); diff --git a/single-peptide.php b/single-peptide.php index a152fe4..d838505 100644 --- a/single-peptide.php +++ b/single-peptide.php @@ -2,8 +2,18 @@ /** * The single peptide template * - * Displays a single peptide with back link, content box, - * and meta information in a card grid layout. + * Displays a single peptide with verdict card hero, content, affiliate + * disclosure, and meta properties in a card grid layout. + * + * When a verdict_state is set on the post, the verdict card owns the

+ * title so the page-header section only renders the back-link and category + * pills (no duplicate heading). When no verdict state exists the classic

+ * renders in the header for backwards compatibility with non-monograph posts. + * + * Who calls it: WordPress template hierarchy for the pr_peptide CPT. + * Depends on: inc/verdict-meta.php (post meta registration), + * template-parts/verdict/card.php, + * template-parts/affiliate-disclosure.php. * * @package peptide-starter */ @@ -16,6 +26,9 @@ get_header(); if ( have_posts() ) { while ( have_posts() ) { the_post(); + + // Determine verdict state once — used in two places below. + $verdict_state = get_post_meta( get_the_ID(), 'verdict_state', true ); ?> + + get_the_ID() ) + ); + } + ?> +
> @@ -69,6 +102,20 @@ get_header();
+ 'inline' ) + ); + } + ?> +