Created
April 12, 2021 14:16
-
-
Save zebrastribe/0209e6133381b5718afc31b968c52f21 to your computer and use it in GitHub Desktop.
Person Schema Yoast
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'wpseo_schema_person', 'example_change_person' ); | |
function example_change_person( $data ) { | |
$user_id = ??; | |
// data | |
$author_avatar = get_avatar_url('[email protected]'); | |
$data['name'] = "John Doe"; | |
$data['author']['name'] = "John Doe"; | |
$data['image']['caption'] = "John Doe"; | |
$data['image']['url'] = $author_avatar; | |
$data['@id'] = $user_id; | |
return $data; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment