-
wie entferne ich den gravatar link aus dem quellcode? aus Einstellung > Diskussionen ist alles entfernt
-
Hello,
Es tut mir leid zu hören, dass Sie Probleme mit dem Entfernen des Gravatar-Links haben. Um den Gravatar-Link aus dem Quellcode zu entfernen, müssen Sie möglicherweise einige Anpassungen in Ihrem Theme oder in den Plugins vornehmen, die den Gravatar-Link generieren.
Hier sind einige Schritte, die Sie versuchen können:
-
Überprüfen Sie Ihr Theme: Manchmal wird der Gravatar-Link direkt im Theme-Code hinzugefügt. Überprüfen Sie die
header.php
oderfunctions.php
Dateien Ihres Themes auf Code, der den Gravatar-Link generiert. -
Plugins überprüfen: Wenn Sie Plugins verwenden, die Benutzerprofile oder Kommentare verwalten, überprüfen Sie deren Einstellungen. Möglicherweise gibt es eine Option, um den Gravatar-Link zu deaktivieren.
-
Custom Code: Wenn Sie mit benutzerdefiniertem Code arbeiten, stellen Sie sicher, dass keine Funktionen den Gravatar-Link hinzufügen.
Wenn diese Schritte nicht helfen, wäre es hilfreich, wenn Sie in Ihrer Antwort auf dieses Ticket die URL Ihrer Website angeben könnten, damit wir Ihnen gezielter helfen können.
Vielen Dank, dass Sie Ihr Anliegen geteilt haben!
Hello,
Thank you so much for getting in touch.
Can you please confirm if you’re referring to the Gravatar link in our plugin’s schema structure?
That information is taken from the data in the profile of the author of the page/post where this appears.
You can control this information by going to WordPress Dashboard > Users and selecting the user that you want to edit. It seems the User in this instance has a Gravatar image as a profile image. You can add a real one there.
Alternatively, you can use the following filter to change the properties of the ImageObject:
add_filter( 'rank_math/json_ld', function( $data, $jsonld ) { $data['ProfilePage']['image'] = [ '@type' => 'imageObject', '@id' => 'ID you want to set', 'url' => 'URL you want to set', 'caption' => 'caption you want to set', ]; return $data; }, 99, 2);
Or like you intend, remove the image object:
add_filter( 'rank_math/json_ld', function( $data, $jsonld ) { unset($data['ProfilePage']['image']); return $data; }, 99, 2);
Here’s how you can add filter/hook to your WordPress site: https://rankmath.com/kb/wordpress-hooks-actions-filters/
Let us know how it goes. Looking forward to helping you.
Thank you.
Hello, thank you very much, it has removed it.
Hello,
Glad that helped.
Please feel free to reach out to us again in case you need any other assistance.
We are here to help.
Thank you.
-
You must be logged in to reply to this ticket.