Schema Person ID
-
Hi
I am making a function that change the author of a post and I need the the Schema to change as well. How so I get the wordpress User ID with the corresponding Schema ID?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; }
The page I need help with: [log in to see the link]
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Schema Person ID’ is closed to new replies.