diff --git a/tests/php/seo-remediation-links-smoke.php b/tests/php/seo-remediation-links-smoke.php index 4843903..f4a59a8 100644 --- a/tests/php/seo-remediation-links-smoke.php +++ b/tests/php/seo-remediation-links-smoke.php @@ -99,7 +99,7 @@ function check( $condition, $message ) { $rm_desc = $GLOBALS['filters']['rank_math/opengraph/facebook/og_description'][0]( 'Old raw description' ); check( $rm_title === threew_2025_get_price_guide_seo()['g63-brabus-price']['title'], 'og:title uses remediated copy' ); check( $rm_tw === $rm_title, 'twitter:title matches og:title' ); -check( str_contains( $rm_desc, 'price estimates' ), 'og:description uses remediated copy' ); +check( $rm_desc === threew_2025_get_price_guide_seo()['g63-brabus-price']['description'], 'og:description uses remediated copy' ); check( ! str_contains( $rm_title, '2026' ) && ! str_contains( $rm_title, '2025' ), 'social title carries no stale year' ); $GLOBALS['mock_slug'] = 'unrelated-post'; check( $GLOBALS['filters']['rank_math/opengraph/facebook/og_title'][0]( 'Keep me' ) === 'Keep me', 'social title untouched elsewhere' ); diff --git a/wp-content/themes/3w-2025/inc/seo-remediation.php b/wp-content/themes/3w-2025/inc/seo-remediation.php index 95f3b3b..4961681 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-21-2'; + $cache_version = '2026-11-21-3'; if ( get_option( 'threew_seo_remediation_cache_version' ) === $cache_version ) { return; } @@ -37,12 +37,12 @@ function threew_2025_get_price_guide_seo() { return [ 'price-of-g-wagon-brabus' => [ - 'title' => 'BRABUS G-Wagon Price & Cost Guide: G63, 700, 800 & 900', - 'description' => 'What a BRABUS G-Wagon costs: price estimates for the G63, 700, 800 and 900, plus upgrade costs. Contact 3W Distributing for current parts pricing and fitment.', + 'title' => 'BRABUS G-Wagon Price: G63, 700, 800 & 900 Costs', + 'description' => 'BRABUS G-Wagon prices: the 700 starts around $375,000, the 800 from $425,000, the 900 Rocket from $500,000+. Most North American buyers pay $400,000-$550,000.', ], 'g63-brabus-price' => [ - 'title' => 'Mercedes-AMG G63 BRABUS Price & Cost Guide', - 'description' => 'What a G63 BRABUS costs: price estimates plus upgrade costs. Browse genuine G-Wagon parts or ask 3W Distributing for current pricing and fitment.', + 'title' => 'Mercedes-AMG G63 BRABUS Price & Upgrade Costs', + 'description' => 'A G63 starts around $180,000-$200,000. A BRABUS 700 conversion adds $100,000-$150,000, and the 800 adds $180,000-$250,000. See what a full build costs.', ], ]; } @@ -202,7 +202,11 @@ function threew_2025_apply_price_guide_product_links( $content, $slug, $campaign $map = threew_2025_get_price_guide_seo(); $slug = get_post_field( 'post_name', get_queried_object_id() ); - return isset( $map[ $slug ] ) ? $map[ $slug ]['title'] . ' - ' . get_bloginfo( 'name' ) : $title; + if ( isset( $map[ $slug ] ) ) { + return $map[ $slug ]['title']; + } + + return $title; }, 20 ); add_filter( 'the_title', function ( $title, $post_id ) {