Hello,
Thanks for contacting us and sorry for any inconvenience that might have been caused due to that.
1. Content from SEO Description field
If that is missing, then:
2. WooCommerce Excerpt or Product Short Description
If that is missing, then:
3. Template From General Settings in WordPress Dashboard > Rank Math > Titles & Meta > Products
If that is missing, then:
4. Auto generated Content from the product page (long description)
Since you are adding the variable in the Titles & Meta, adding a short description will override that. You can use the filter given below to make the Titles & Meta first priority to fetch the description:
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.
Hello Jaideep,
Thanks for your reply! I added the code and I am using the shortcode %term_description%. Nonetheless the product short description is still displayed.
Any idea why? Thanks!
Hello,
We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.
Please do take a complete backup of your website before sharing the information with us.
It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:
https://wordpress.org/plugins/temporary-login-without-password/
You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):
https://wordpress.org/plugins/wp-security-audit-log/
We really look forward to helping you.
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
Hello,
Thank you for that information.
The product’s short description you have set will be always prioritized if there is data added.
However, since you wanted to force the use of the long description, I’ve put an additional filter in your theme’s functions.php file which registers a custom variable for the product’s long description. The variable used is %woo_full_desc%
.
Please note that the filter may not be visible while editing the products as it only works when your products load in a browser. You can check the published/saved product meta description via the page’s source code.
You can also check the product’s meta description using this tool:
https://www.heymeta.com/
I hope that helps.
Thank you.
Hello,
Thank you very much for your solution. I tested it out and it works as expected!
Hello,
We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.
If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.
If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.
Thank you.