Hello @hameedfarah,
Thank you for contacting the support and sorry for any inconvenience that might have been caused due to that.
The post excerpt/Product short description takes priority over the Settings.
You can use the following code to change this priority:
https://rankmath.com/kb/filters-hooks-api-developer/#use-global-meta-description
Hope that helps.
Hello @hameedfarah
Glad that helped.
If it isn’t too much to ask for – would you mind leaving us a review here?
https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post
It only takes a couple of minutes but helps us tremendously.
It would mean so much to us and would go a really long way.
Thank you.
Thank you so much, @hameedfarah!
We sincerely appreciate that.
Please feel free to reach out to us in case you need any assistance. We’re just a support topic away.
How to change only product short descriptions? I try code above and it change all the dsecriptions include my tags custom descriptions.
Hello @megos,
Thank you for contacting the support.
You can use the code given below to change the SEO description priority only for the products.
add_action( 'rank_math/frontend/description', function( $generated ) {
if ( ! is_product() ) {
return $generated;
}
global $post;
$desc = RankMath\Helper::get_settings( "titles.pt_product_description" );
$desc = RankMath\Helper::replace_vars( $desc, $post );
return empty( $desc ) ? $generated : $desc;
});
Hope this helps. Let us know if you need any other assistance.