-
Hello,
“Single Product Description” template is not working for product descriptions if products have excerpts.
I have read various threads related to this bug, and used filter that was suggested by your support staff as a workaround.
add_filter( 'rank_math/frontend/description', 'my_page_description' ); function my_page_description( $description ) { if ( ! is_woocommerce() ) { return $description; } if ( is_product() ) { global $post; $custom_description = \RankMath\Post::get_meta( 'description', $post->ID ); if ( ! $custom_description ) { $description_format = \RankMath\Helper::get_settings( 'titles.pt_product_description' ); if ( $description_format ) { return \RankMath\Helper::replace_vars( $description_format, $post ); } } } return $description; }This works for frontend. However, this filter is not applied to SERP preview on product edit page. Rank Math SEO metabox still shows product excerpt as single product description.
This makes focus keyword tool unusable. I.e. if I have “Buy my product” in filtered description, and don’t have “Buy my product” in product excerpt, focus keyword tool will show incorrect results when tested for “my product” keyword.
The ticket ‘Single product description & focus keyword issue’ is closed to new replies.