Get AI SEO for FREE.

Learn More!

Support Rank Math Free Schema.org sameAs property for linkedin , facebook , Reply To: Schema.org sameAs property for linkedin , facebook ,

Reply To: Schema.org sameAs property for linkedin , facebook ,

Alberto
Rank Math business

Hello,

Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

A few days ago I published a code that I think you might find useful, you can modify that part of the Schema using this filter, and for example, in this snippet I am adding new URLs to the ‘sameAs’ field, but you could modify everything:

/**
* 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 ) {
	$currentSameAs = $data['Organization']['sameAs'];
        $currentSameAs[] = "https://wordpress url....";
        $currentSameAs[] = "https://blogger url....";
        $currentSameAs[] = "https://tumblr url....";
        // And so on...

        $data['Organization']['sameAs'] = $currentSameAs;
	return $data;
}, 10, 2);

Looking forward to helping you. Thank you.

​​​​​​​