Adding Schema.org sameAs property for facebook, Instagram, linkedin, etc

#196073
  • Resolved BestPriceBuys Team
    Rank Math free

    Hi,

    I wish to add my site’s (https://bestpricebuys.com) social media profiles in the ld+json Schema. I have added the code snippet shared by you in some other threads in my theme’s functions.php (pasted the script in Sensitive Data section). However, it is not updating the schema details on the page. Please suggest where am I making a mistake.

    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    You can try and modify this working filter to add the sameAs property for your social media profiles.

    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);

    I hope that helps.

    Thank you, and looking forward to your update.

    Sorry, even this did not work.

    It added the social profile links on the page but is giving Schema Error of “Unspecified Type” appended the details in sensitive data section.

    Please help.

    Please Respond. Awaiting help.

    Hello,

    Thank you for the update, and we apologize for the extreme delay.

    This ticket seems to have been stuck in our drafts section.

    However, could you please try modifying the first filter you used and change the terms organization to publisher? Once done, please clear your website’s cache and check again.

    Please also note that Structured Data Testing Tool is being deprecated. For validating structured data for Google Search, Google now recommends using the Rich Results Test for more accurate and actionable feedback.

    I hope that helps.

    Thank you, and looking forward to your update.

    Thanks!

    Hello,

    Thank you for the update.

    We are glad it worked for you.

    If you have any other concerns, please don’t hesitate to contact us anytime by creating a new ticket to assist you further with anything else.

    Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)

The ticket ‘Adding Schema.org sameAs property for facebook, Instagram, linkedin, etc’ is closed to new replies.