-
we would like to add schema like this in our website but don’t know to use filters hooks of rankmath? I try to add it with code snippet plugin in wordpress. If I add following code to function file it will give new field to add schema in each page?
/** * 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);
`”areaServed”: [{
“@type”: “City”,
“name”: “Boulder”,
“sameAs”: “https://en.wikipedia.org/wiki/Boulder,_Colorado”
},
{
“@type”: “City”,
“name”: “Denver”,
“sameAs”: “https://en.wikipedia.org/wiki/Denver”
}]
}`
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
The ticket ‘Need in adding Hook to my website’ is closed to new replies.