Hello,
Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.
To be able to add your custom schema on the category pages, I can suggest that you make use of the filter below. You would need to create some custom logic to check if you are on a category page and then inject the custom JSON-LD data.
/**
* Collect data to output in JSON-LD.
*
* @param array $unsigned An array of data to output in json-ld.
* @param JsonLD $unsigned JsonLD instance.
*/
add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
return [];
}, 10, 2);
Looking forward to helping you. Thank you.
Thanks for your answer. Can you give me an example what I could return?
I want to add the following json-ld:
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "Product",
"name": "xyz",
"image": "",
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.78",
"bestRating": "5",
"worstRating": "1",
"ratingCount": "132"
}
}
</script>
Thanks in advance!
Hi Chris,
As much as we would love to offer customized solution to each and every user we have, it just isn’t possible for a small company like ours with limited resources.
You can stick to the options offered in the plugin or hire a coder to extend them.
Hello,
thanks for your answer. Problem solved: moved back with all my websites to Yoast.
Kind regards
Hello Chris,
We are so sorry to hear that but Yoast doesn’t natively offer that feature either. We are glad your custom solution is working there.
At the end of the day, you should make your website better regardless of whether you use Rank Math or any other SEO plugin.