Add social media to structured data

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math today.

    We removed multiple social meta as they are no longer required for the knowledge graph by Google or Bing.

    If you still wish you can add your social profiles to your site’s structured data using the sameAs tag, you can use the filter below:

    add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
        if ( isset( $data['Organization'] ) ) {
            $data['Organization']['sameAs'] = ['', ''];
        return $data;
    }, 99, 2 );

    Replace the social URLs with your site social URLs and you can also add other social profiles.

    Please note that Google has changed a lot and they get more intelligent every passing minute with AI and countless algorithm they have in place. They pick the Social profiles from across the web and they do not need you to have the “sameAs” tag to show the social profiles in your Knowledge Panel.

    Here is an example you can confirm from your end as well.

    If you search for “Walmart”, these are all the social profiles you see:

    Go to their website and you will notice that they don’t have a single “sameAs” tag:

    You can run it through Google Rich Results test as well and notice they don’t have any Schema for those social profiles:

    As you can see, the social profiles are shown in the knowledge panel not because you have the “sameAs” code, but rather because you are an established brand with a strong social media presence.

    This is why we removed the “sameAs” tags in Rank Math and here are links from Google and Bing that essentially tell you that having sameAs tags doesn’t affect the addition or removal of social profiles from your knowledge panel:
    (screenshot for reference: )


    The Twitter and Facebook fields are still there because they are used for “OpenGraph” and “Twitter Cards” code that we bring in your website’s source code.

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.


Viewing 1 replies (of 1 total)

You must be logged in to reply to this ticket.