Archived topic
Dynamically add JSON script depending on author
3 replies · Started by Mark on January 30, 2023
Hi there,
Thought I'd ask you rather than me spending hours trying to work this out!
I've added 2 URLs in the private area below. If you scroll to the bottom of each URL, you'll see author boxes. I added text in the User section in order to populate the text.
However, how can I add "person" schema so that the right custom HTML block (with the schema) sits under the correct author. When I add a custom HTML block with a person schema it will obviously apply to BOTH authors - not good.
Note that I created the author box as an "Element"
Thank you.
Hi Mark,
Can you add the Person Schema as you've previously done? We'll just check how you want it done, and advice what needs to be altered to make it work afterward.
I can't seem to be able to add videos or images here to show.
Basically, for each Author I want a different author/person schema put in that reflects that author. Does that make sense?
I added one schema that would be added for one (I have been adding as a custom HTML). Obviously a different one will be needed for the other author.
If you check you can probably see the code now. I'll not keep the code on for long as I don't want to send Google the wrong signals.
I see. Thank you for clarifying.
Such a feature is not available through GeneratePress.
See David's response here: https://generatepress.com/forums/topic/adding-schema-to-my-website/#post-2470209
He suggests potential ways to do it in his reply.