Hello,
Thank you for getting in touch and I am extremely sorry about the trouble this might have caused.
1. To allow adding the shortcode in your product description, please use this filter: https://rankmath.com/kb/filters-hooks-api-developer/#allow-shortcodes-in-product-description
2. Please check if the brand code is still intact in your functions.php. if it is, could you please share a sample product URL we can check from our end?
3. To modify the priceCurrency you can use this filter: https://rankmath.com/kb/filters-hooks-api-developer/#change-post-schema-data
Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.
1. For shortcodes in the Schema description, because I will also use shortcodes in the SEO description fields, I will use this code
add_filter( 'rank_math/frontend/description', function( $description ) {
$description = apply_shortcodes( $description );
return $description;
});
Will this also work for the Schema description, because I did a quick test my end and it seems to work for the Schema description as well? Or am I mistaken and should I also add your suggested code too? Both codes?
2. The brand code is still intact, but it’s still not working in the product Schema. I think I will just leave this for now, as Google says it’s an optional field.
3. So this would be the same as the brand code, except for of course, instead of
$entity['brand'] = 'Rank Math';
I would use
$entity['priceCurrency'] = 'USD';
Thank you…
Hello,
You can use the code you are using or the code my colleague shared, both should work without any issues.
Looking forward to help you.
Confused here. Seems the shortcodes work in the schema description without any code snippet, so I guess I don;t need to add any code snippets for that?
But for the product SEO description, this code snippet works:
add_filter( 'rank_math/frontend/description', function( $description ) {
$description = apply_shortcodes( $description );
return $description;
});
But this code snippet doesn’t work:
add_filter( 'rank_math/product_description/apply_shortcode', '__return_true' );
For the schema data code snippets, none work, this includes for “brand” or “priceCurrency”:
$entity['brand'] = 'Rank Math';
$entity['priceCurrency'] = 'USD';
Hello,
The specified filter to apply shortcode on meta description should work. We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress logins in the designated Sensitive Data section.
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,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.