What is the best way to add FAQ Schema?

Hi there,

I am trying to add this FAQ schema to my Ghost test blog using the HTML Card option, but nothing is showing on the post that I published.

Here is the test code that I used:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": {
    "@type": "Question",
    "name": "What is your favorite color?",
    "acceptedAnswer": {
      "@type": "Answer",
      "text": "My favorite color is purple."
    }
  }
}
</script>

How do I use this FAQ schema code to show properly in a Ghost post?

Any help would be appreciated.

What are you expecting to show? How are you testing that the schema isn’t being parsed correctly by the tool(s) you care about reading it?

Hi Kevin

“What are you expecting to show?” I am expecting to show a FAQ with questions and answers for my Ghost blog.

“How are you testing that the schema isn’t being parsed correctly by the tool(s) you care about reading it?” I pasted the above schema code in the HTML Card and published the post. But nothing is showing in the post that I published.

Ah, you’ve perhaps misunderstood how schema work, @SuperCat74 . The Schema helps search engines understand what’s on the page, but it doesn’t cause the content to exist on the page. You’ll need to create the content (I like toggle boxes for this) yourself, to match the schema content.

@Kevin , it would be super cool if we could have a tiny fork of the toggle card to generate the schema in question automagically.

2 Likes

Hi Cathy

You’re right I don’t understand how it truly works, but would be nice if someone could show exactly how it works, so one can implement a FAQ schema for their Ghost blog.

So Supercat, what you need to do is paste the schema into an HTML card (or in the code injection - either will probably work), but then you /also/ need to create the FAQ content on the Ghost page, normally, using the Ghost editor.

1 Like

This is an example of how I am going to do it following the information you have given me above:

Paste this FAQ schema code shown below in the post code injection part (the main code injection of Ghost should not be used for this, is that right?):

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": {
    "@type": "Question",
    "name": "What is your favorite color?",
    "acceptedAnswer": {
      "@type": "Answer",
      "text": "My favorite color is purple."
    }
  }
}
</script>

Now if I create the following Question and Answer below anywhere for this post, it will have a rich results schema for Google search results. Is that right?

What is your favorite color?
My favorite color is purple.

Have I done it right now, or am I missing something?

Yes. And you’re correct, you should NOT use the main code injection under settings, unless EVERY page has the FAQ content. If you want to use code injection, use the one in the post editor - it’s on the right side, the same menu where you’d set tags, just scroll down. :slight_smile:

1 Like

Thank you so much Cathy the Ghost Expert for helping me understand how the FAQ schema works.

I believe you should get a special badge or title on this Ghost forum. You truly deserve it, you go out of your way to help people solve all their Ghost problems :wink:, which is very special and rare to find.

3 Likes