From 210219c77c7bc0e67e18d2ed26dff0fd84793a4a Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Sun, 22 Nov 2026 19:49:16 -0800 Subject: [PATCH] Apply About page metadata at its real source The previous attempt changed the document title but left the description and heading untouched: the SEO class reads the page's excerpt field directly, and page-about.php hardcodes the H1 rather than rendering the post title. Description now comes from an explicit page map in the SEO class, the H1 is edited in the template, and the excerpt filter that never fired is removed. --- wp-content/themes/3w-2025/inc/seo-class.php | 11 +++++++++++ wp-content/themes/3w-2025/inc/seo-remediation.php | 9 +-------- wp-content/themes/3w-2025/page-about.php | 2 +- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/wp-content/themes/3w-2025/inc/seo-class.php b/wp-content/themes/3w-2025/inc/seo-class.php index 3268492..2a2ebc4 100644 --- a/wp-content/themes/3w-2025/inc/seo-class.php +++ b/wp-content/themes/3w-2025/inc/seo-class.php @@ -611,6 +611,17 @@ private function output_product_schema() { * Get meta description */ private function get_meta_description() { + // Pages whose editor excerpt is too short to work as a description. + if (is_page()) { + $page_descriptions = array( + 'about-us' => '3W Distributing supplies genuine BRABUS parts and Mercedes G-Class upgrades from Las Vegas, with worldwide shipping and fitment support.', + ); + $slug = get_post_field('post_name', get_queried_object_id()); + if (isset($page_descriptions[$slug])) { + return $page_descriptions[$slug]; + } + } + if (is_home() || is_front_page()) { return $this->home_description ?: ($this->site_description ?: 'Welcome to 3W Distributing - Your trusted source for automotive parts and accessories'); } diff --git a/wp-content/themes/3w-2025/inc/seo-remediation.php b/wp-content/themes/3w-2025/inc/seo-remediation.php index 5fccefe..4c68cbe 100644 --- a/wp-content/themes/3w-2025/inc/seo-remediation.php +++ b/wp-content/themes/3w-2025/inc/seo-remediation.php @@ -13,7 +13,7 @@ * Purge stale full-page cache once when this remediation version ships. */ add_action( 'init', function () { - $cache_version = '2026-11-22-1'; + $cache_version = '2026-11-22-2'; if ( get_option( 'threew_seo_remediation_cache_version' ) === $cache_version ) { return; } @@ -211,13 +211,6 @@ function threew_2025_get_page_seo() { return isset( $map[ $slug ] ) ? $map[ $slug ]['heading'] : $title; }, 20, 2 ); -add_filter( 'get_the_excerpt', function ( $excerpt, $post ) { - $map = threew_2025_get_page_seo(); - $slug = $post instanceof WP_Post ? $post->post_name : ''; - - return isset( $map[ $slug ] ) ? $map[ $slug ]['description'] : $excerpt; -}, 20, 2 ); - /** * Consolidate overlapping price articles into two authoritative hubs. */ diff --git a/wp-content/themes/3w-2025/page-about.php b/wp-content/themes/3w-2025/page-about.php index 5fb7423..51d7446 100644 --- a/wp-content/themes/3w-2025/page-about.php +++ b/wp-content/themes/3w-2025/page-about.php @@ -17,7 +17,7 @@

Your Partner in Performance

-

About Us

+

About 3W Distributing

Premium aftermarket parts and accessories for enthusiasts who demand excellence