How to add all social links

#83287
  • Resolved Hwrig
    Rank Math free

    How to all all social links in schema data so all social profiles show when Google is crawling

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

    Thank you for contacting Rank Math today.

    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:
    https://i.rankmath.com/ij1CeL

    Go to their website and you will notice that they don’t have a single “sameAs” tag:
    https://i.rankmath.com/MpmFjU

    You can run it through Google Rich Results test as well and notice they don’t have any Schema for those social profiles:
    https://i.rankmath.com/JNrFJk

    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:
    https://support.google.com/knowledgepanel/answer/7534842
    (screenshot for reference: https://i.rankmath.com/Ut3CGr )

    &

    https://www.bing.com/webmaster/help/markup-businesses-and-organizations-cc507c09

    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.

    If you still wish to add the sameAs tag to your site schema, you can use the filter below:

    
    add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
        if ( isset( $data['Organization'] ) ) {
            $data['Organization']['sameAs'] = ['https://twitter.com/RankMath', 'https://facebook.com/Rankmath'];
        }
        return $data;
    }, 99, 2 );
    

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

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

    ​​​​​​

    Hwrig
    Rank Math free

    Hi, Thanks for reply.
    What you are saying apply to huge corporations, not a micro niche blog.
    Anyways, where and how do I add the codes ?

    Hello,

    I understand your concern.

    You can add the code to your them functions.php file.

    Looking forward to helping you. Thank you.

    ​​​​​​

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

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

The ticket ‘How to add all social links’ is closed to new replies.