diff --git a/wp-content/themes/3w-2025/inc/seo-class.php b/wp-content/themes/3w-2025/inc/seo-class.php index 88c7069..3268492 100644 --- a/wp-content/themes/3w-2025/inc/seo-class.php +++ b/wp-content/themes/3w-2025/inc/seo-class.php @@ -156,17 +156,11 @@ private function rank_math_active() { public function output_meta_tags() { $description = $this->get_meta_description(); $keywords = $this->get_meta_keywords(); - $rank_math = $this->rank_math_active(); echo "\n\n"; + echo '' . "\n"; - // Rank Math emits its own description; a second tag lets Google pick the - // stale stored one, so only one emitter is allowed to run. - if (!$rank_math) { - echo '' . "\n"; - } - - if (!$rank_math && !empty($keywords)) { + if (!empty($keywords)) { echo '' . "\n"; } diff --git a/wp-content/themes/3w-2025/inc/seo-remediation.php b/wp-content/themes/3w-2025/inc/seo-remediation.php index 6b93d26..e88a300 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-4'; + $cache_version = '2026-11-21-5'; if ( get_option( 'threew_seo_remediation_cache_version' ) === $cache_version ) { return; } @@ -263,9 +263,21 @@ function threew_2025_filter_guide_social_description( $content ) { return isset( $map[ $slug ] ) ? $map[ $slug ]['description'] : $content; } -// Rank Math resolves the meta description from stored post meta, which still -// carries the pre-remediation copy. This runs on its final-value filter. -add_filter( 'rank_math/frontend/description', 'threew_2025_filter_guide_social_description', 20 ); +/** + * Keep Rank Math from printing a second . + * + * The theme already emits one from the live excerpt, which the guides rewrite + * above. Rank Math's copy comes from stored post meta on the guides (the stale + * "Discover the 2025 price..." text) and from thin auto-generated copy + * elsewhere, so leaving it in place only gives Google a worse option to pick. + * + * @return string + */ +function threew_2025_suppress_rank_math_description() { + return ''; +} + +add_filter( 'rank_math/frontend/description', 'threew_2025_suppress_rank_math_description', 99 ); add_filter( 'rank_math/opengraph/facebook/og_title', 'threew_2025_filter_guide_social_title', 20 ); add_filter( 'rank_math/opengraph/twitter/twitter_title', 'threew_2025_filter_guide_social_title', 20 );