So i can add other socail networks to the SameAs tag?
Hello,
Thanks for contacting us and sorry for any inconvenience that might have been caused due to that.
Can you please confirm if you are asking about the filter given below:
add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
if ( isset( $data['publisher'] ) ) {
$data['publisher']['sameAs'] = [
'https://www.instagram.com/', //use the URL of your Instagram profile
];
}
return $data;
}, 99, 2 );
You will need to add the filter in your theme’s functions.php file to apply it to your site. You can also create a new file or use a plugin to add the filter. Here is a guide that will explain all three ways to add the filter in detail: https://rankmath.com/kb/wordpress-hooks-actions-filters/
Hope this helps. Let us know if you need any other assistance.
Thank you and i will go through the post 🙂
Is there a different way since i am using Elementor Pro? As they have custom code etc built in?
Hello,
The guide shared by my colleague is the recommended way for adding custom code/filters to the website.
I would also like to mention that, if you’re adding this schema for getting the social profiles added in the knowledge panel, then Google picks the Social profiles from across the web and they do not need you to have the sameAs
schema to show the social profiles in your Knowledge Panel.
Hope this helps.
Thank you.
That was the reason i was doing this – so you are saying that i do not need to bother as this is an old way of doing things and google will just find them naturally?
Hello,
Yes, Google has changed a lot, and they get more intelligent every passing minute with AI and countless algorithms they have in place.
They pick the Social profiles from across the web and you do not need to add the sameAs
schema to get the social profiles in the knowledge panel.
You can have a look at this tweet for a quick reference:
https://twitter.com/googlesearchc/status/1143558928439005184
Hope this helps.
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.