Archived topic
GP Blocks / structured data / faq
3 replies · Started by Jan on July 18, 2022
Hi David,
I'd like to embed structured data into a FAQ section built with two GB containers and headline blocks.
An online generator tool like this would provide me with the JSON-LD to add to an HTML block.
This issue is that this JSON-LD includes both question and answer into the same snippet. For my template, however, I need two code snippets, one for the question and one for the answer.
When I look at the html of the Yoast FAQ block they seem to use and ID in order to a questions to the relevant answer (see screenshot).
How would you go about splitting the following:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [
{
"@type": "Question",
"name": "This is the Question.",
"acceptedAnswer": {
"@type": "Answer",
"text": "Here comes the Answer."
}
}
]
}
</script>
Any advise would be much appreciated.
Best,
Jan
Hi Jan,
Can you open a support topic in GB's support forum as it's directly related to GB and it might be helpful for other GB users?
https://wordpress.org/support/plugin/generateblocks/
Thanks!
Sure. Here you go: https://wordpress.org/support/topic/gp-blocks-structured-data-faq/
Thanks!