If you’ve been using Yoast SEO in your site in a while, you probably have noticed that nifty Yoast Structured Data Block called FAQ buried inside WordPress Gutenberg editor.
It’s a feature first introduced by Yoast back in September last year which makes it easy to exploit FAQPage schema and improve your Google Search visibility in the process.
A well-structured FAQPage tells search engines that your content has a set of questions and corresponding answers. This helps search engines understand your content better and if properly marked up, your page may be qualified to have a rich result on Google Search or Action on Google Assistant.
See Also: How To: Bulk Update Yoast SEO Meta Data or All-In-One SEO Pack Using CSV
Yoast’s FAQ block already works out-of-the-box, no action required from your end. It automatically generates the needed JSON-LD markup for Google’s consumption.
Here’s how Yoast’s FAQ block looks like in the frontend:
Nothing fancy right?
Add Collapsible Headers or Accordion to Yoast FAQ Schema
Now, if you want to go fancy and enhance it with collapsible headers (or accordion), where answers are hidden which can only be revealed by clicking on the question, here’s a tiny line of Javascript and CSS to achieve that:
Once the above CSS and Javascript are added, refresh your FAQ page.
Your Yoast FAQ page should now be upgraded to something like this:
See Also: How To: Load Third-Party Scripts Without Hurting Your Site Speed