Archived topic
How to add ClaimReview Schema
5 replies · Started by Shrawan on August 16, 2020
Hi Team,
Could you please provide me an idea of how to have FactCheck Schema on my site?
Google has provided a tool to make the contents here – https://toolbox.google.com/factcheck/markuptool
Once I’ve gone through the steps of making a claim, I’m given the option to copy+paste a JSON-LD code.
The Rank Math plugin team asked me to integrate this into my functions.php file -
/**
* 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);
I used the CodeSnippets plugin to add the above code, but yet when I copy+paste the JSON-LD into the desired URL, it does not work.
Hi there,
Can you try removing GP's schema?
https://docs.generatepress.com/article/generate_schema_type/
Hi Leo, do I have to make a new Snippet with this - add_filter( 'generate_schema_type', '__return_false' ); - and run the Snippet everywhere?
Yup give that a shot.
Tried it, but did not work.
I do have a second question - Is it alright to leave GP's Schema enabled alongside Rankmath's Schema?
It's best to remove the built-in schema if you'll be provided additional schema elsewhere.
As for the original issue, you may want to report back to Rank Math and see if there's anything else you need to do to make it work.