4

The Yoast plugin for WordPress generates Schema.org markup for posts. In my case it's something like this:

"author":{"@id":"https://www.example.org/#/schema/person/123456abcdef"}

and

{"@type":["Person"],"@id":"https://www.example.org/#/schema/person/123456abcdef","name":"John Doe","sameAs":[]}

How can I change the value of @id to a value defined by me? I've been using a manually generated @id for the same person on other pages and would like to use the same value here.

unor
  • 92,415
  • 26
  • 211
  • 360
Jörg
  • 261
  • 1
  • 2
  • 6

1 Answers1

0

You can do it in wpseo_schema_person_user_id filter.

Example: how to hide person id

add_filter( 'wpseo_schema_person_user_id', '__return_false' );

Tip: use PHPStorm with WordPress plugin to use autocomplete:

PHPStorm WordPress autocomplete example

Ostap Brehin
  • 3,240
  • 3
  • 25
  • 28