HowTo JSON-LD FAQ Page

json-ld FAQ

So you can easily integrate JSON-LD for questions & answers (FAQ) and benefit from the special presentation e.g. in the SERPs of Google.

  • you research W-questions about your product/topic
  • you integrate the question + answer using the dialog in your editor
  • save the post/page and you will find the preformatted and schema.org marked content box in the frontend
  • with the check mark at “Render HTML” you can decide if the content should be displayed on your website or if you only want to output the JSON-LD in source code
FAQ JSON-LD

If you use Gutenberg in your WordPress installation, you don’t have to pay attention to anything else. Even if you want to answer several questions on one page, just add several FAQs within one block (NOTE: several questions within one block – not several blocks on one page).

select a structured element

In the old WordPress Editor (TinyMCE) this is a bit more complicated, because you have to work with shortcodes.
The problem: in the TinyMCE no dynamic shortcodes work. A shortcode can only interpret a fixed defined thing. But multiple questions are dynamic (1 – n questions & answers).
Therefore we decided to offer two shortcodes:

  • Single FAQ – thought if you only have a FAQ and want to get into the Answer-Box at Google. Here you can also design the answer and provide it with links
  • Multi FAQ – intended for several FAQs on one page, e.g. to extend your snippet on Google. You can’t insert links into the answer here, because the quotation marks in HTML within a shortcut are automatically removed by the TinyMCE.
<script type="application/ld+json">
    {
        "@context": "https://schema.org",
        "@type": "FAQPage",
        "mainEntity": [
                    {
                "@type": "Question",
                "name": "W-Frage 1?",
                "acceptedAnswer": {
                    "@type": "Answer",
                    "text": "Man kann die Inhalte auch <a href=\"https://deineURL.com\">formatieren<\/a> z.B. als <b>LISTE</b>:\n<ul><li>Listenpunkt 1<\/li><li>Listenpunkt 2<\/li><li>Listenpunkt 3<\/li><li>Listenpunkt 4<\/li><\/ul>"
                    }
            	},
	        {
                "@type": "Question",
                "name": "W-Frage 2?",
                "acceptedAnswer": {
                    "@type": "Answer",
                    "text": "Eine weitere Antwort und falls Du magst auch ein <a href=\"https://deineURL.com\">Link<\/a>."
                    }
                 },
                 {
                "@type": "Question",
                "name": "W-Frage 3?",
                "acceptedAnswer": {
                    "@type": "Answer",
                    "text": "Einfach nur eine Textantwort. Nutzt z.B. die Cliffhanger-Technik, um die Klicks zu erhalten."
                     }   
                }
         ]
    }
</script>

#Single FAQ shortcode for TinyMCE

[sc_fs_faq sc_id="fs_faqUniqueID" html="true/false" headline="p or h2-h6" img="img-id-231" question="Deine Frage" img_alt="img-alt text" css_class="your-class"]Deine Antwort – diese kannst du formatieren wie Du magst; inkl. Links[/sc_fs_faq]

#Multi FAQ shortcode for TinyMCE

[sc_fs_multi_faq headline-0="h3" question-0="Deine Frage 1" answer-0="Deine Antwort 1" image-0="" headline-1="h3" question-1="Deine Frage 2" answer-1="Deine Antwort 2" image-1="" headline-2="h2" question-2="Deine Frage 3" answer-2="Deine Antwort" count="3" html="true" css_class=""]

FAQ

The problem is, that you want to use quotation marks in the answers. Quatation marks within an shortcode are not possible. Delete the quotations marks and it will work.

–Background–
If you’re using Gutenberg you can format the answer as you want.

If you’re using Single FAQ in the TinyMCE to conquer the AnswerBox in the SERPs you can also format the answer between the opening and closing shortcode.

If your’re using Multi FAQ in the TinyMCE then you reach the limits of the TinyMCE. Because the answers need to be in one shortcode you can’t make use of HTML – the TinyMCE will delete the special characters < " > within the answer area of the shortcode.

We’re sorry but this a limitation of the TinyMCE/Shortcode itself. Switch to Gutenberg 😉

#✅ How to edit existing FAQ?

Do you use the shortcodes? If yes, the lightboxmodal only works when creating the shortcode. If you want to modify the Questions or answers, please edit the shortcode itself.

If you want to merge multiple FAQ-shortcodes on a site just delete the shortcodes and create a new “Multiple FAQ” shortcode.

If you’re using Gutenberg you can edit the FAQ block and format the answer as you want and you will always have an beautiful graphical userinterface.

Sorry but that are the limits of an shortcode within the tinyMCE.

#✅ Why does the FAQ shortcode not work?

Please make sure you use normal quotation marks – there is a difference between
” vs ″ vs “

The last one is the good one 🙂 this can sometimes happen when you use the visual editor in special environments – then the tinyMCE formats the the quotation marks in a wrong way.

Just replace the quotation marks with the one you find on your keyboard (search&replace function) and the shortcode works.

#✅ Why the Structured Data Testing Tool gives error with multiple FAQ?

You do not need to insert the multi-FAQ Shortcode multiple times. You can answer all questions within one shortcode!
Select MultiFAQ in your TinyMCE and at the bottom of the lightboxmodal (where you insert the question and the answer) you’ll find a button “Add one” – this means “Add another FAQ”. Then you can add second, a third etc. FAQ.
Please check the reference shortcode above.

#Screenshots

3 Kommentare zu "HowTo JSON-LD FAQ Page"

  • Hello! I am sorry to contact you on this comment section, but I can not log in to WordPress.org support.

    I have your Structured Content (JSON-LD) plug in and am having issues with Duplicate Field FAQPage. I have no experience at all with coding, just a photographer trying to make my website better with FAQ’s. So I am confused how to fix this issue I am having.

    I have made one blog post in my Word Press blog, and entered four (4) FAQ’s within the copy of the post. I am using the Classic WP Editor. I used the “Multi FAQ” option with the plug in because I read in the support thread you said it’s better to use the “Multi FAQ” for Classic Editor.

    But I am still receiving “Duplicate Field FAQ Page” when Google indexed my post.

    Please tell me how to fix this? My blog post: https://www.mattcramerphotography.com/2019/10/newborn-baby-photographers-los-angeles/

    I can also send you screen shots of my Google Search Console showing the Duplicate Field FAQ issues.

    Thank you so much for your time, Jessica

Leave a Reply

Your email address will not be published. Required fields are marked *