-
Hello everyone,
I face a problem and i want your help.Products has 2 descriptions. Short description and product description
Rank math automatically collects short description for excerpt.
How to reverse that and take the products description instead ?Thank you.
this code is not working :
/**
* Use the Description from Global Setting, if the description is missing in the Post metabox
*/
add_action( ‘rank_math/frontend/description’, function( $description ) {
global $post;
$desc = RankMathPost::get_meta( ‘description’, $post->ID );if ( is_product()) {
$desc = RankMathHelper::get_settings( “titles.pt_{$post->post_type}_description” );
if ( $desc ) {
return RankMathHelper::replace_vars( $desc, $post );
}
}return $description;
});
The ticket ‘Product description’ is closed to new replies.