Hello,
Thank you for contacting Rank Math and bringing your concern to our attention.
This type of Schema can only be used on the WebPage Schema or any of the subsets.
Since we add the WebPage automatically to the website, you would need to use this method to extend the Schema from our plugin and add additional properties:
https://rankmath.com/kb/filters-hooks-api-developer/#extend-json-ld-data
Alternatively, you can easily do that in Rank Math PRO by using the Schema Template feature:
https://rankmath.com/kb/schema-templates/#extending-schema
Hope that helps.
Thank you.
Thank for replying.
Is there any documentation on “Filter to extend json+ld data” that I can read?
Hello,
I’m sorry, but we don’t have documentation for the specific filter. However, you can check this link on how to apply it on your site:
https://rankmath.com/kb/wordpress-hooks-actions-filters/
Here’s a sample code where you can start and customize it depending on your site needs:
add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
$data['WebPage']['reviewedBy'] = "Author name";
$data['WebPage']['lastReviewed'] = $data['WebPage']['dateModified'];
return $data;
}, 99, 2);
Once you have applied the filter, you can validate the schema using these tools:
https://validator.schema.org/
https://search.google.com/test/rich-results
Hope that helps.
Thank 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.