Hello @etrarkia,
Thank you for contacting support.
Could you please check if the data is present in the actual page when you load it in the browser?
Looking forward to hearing back from you.
Thanks for answering quickly.
It is not.
It displays content from Product Short Description field only.
When I click at Edit Snippet, I can edit it, but as there are many products, it would took days to do it.
What’s strange is when in Edit Snippet window I enter Custom Field tag that I used in Titles & Meta > Products > Single Product Description, it displays me the right content. Again, I’d have to enter manually into each product and Edit Snippet one by one.
Do you have any suggestion maybe?
Thanks!
Hello @etrarkia,
This is the order we follow to generate meta descriptions for WooCommerce products:
- Content from SEO Description field
If that is missing, then:
- WooCommerce Excerpt or Product Short Description
If that is missing, then:
- Template From General Settings in WordPress Dashboard > Rank Math > Titles & Meta > Products
If that is missing, then:
- Auto generated Content from the product page (long description)
Since you are adding the variable in the Titles & Meta, your short description will override that. Please add the filter given below to add the description from the global settings. Please note that the filter will add the correct description in the front end but you will still see the short description in the snippet editor of the meta box.
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 that helps. Let us know if you need any other assistance.