Add FAQ Schema

How To Add FAQ Schema Markup in WordPress Site (2019)

Google is trying to match a question from a searcher to an answer from a source. It is looking for easy to understand, block-based content that it can use to answer searchers questions right in the search engine.

If you mark up your questions and answers with FAQ schema, it can lead to capturing more space within your target SERP, leading to a higher click-through rate, giving you the competitive edge against your rivals.

Below is the example:

Google search FAQ Schema result

FAQ Schema

FAQ Schema can be used on any page that contains a list of questions and answers on any particular topic. You can create a frequently asked questions resource on any topic and use the Schema to indicate that the content is structured as an FAQ.

Marking up your FAQ content can create rich results that dominate the SERP, with the potential to take up a huge amount of search result space compared to other listings.

The FAQ content must be a perfect match to the content displayed on the page, and displaying different content in your Schema than what is displayed on the page can result in a manual action. Google has a set of content guidelines to follow for FAQ Schema.

Google Guidelines

Valid use cases:

  • An FAQ page was written by the site itself with no way for users to submit alternative answers
  • A product support page that lists FAQs with no way for users to submit alternative answers 

Invalid use cases:

  • A forum page where users can submit answers to a single question
  • A product support page where users can submit answers to a single question
  • A product page where users can submit multiple questions and answers on a single page
  • Don’t use FAQ Page for advertising purposes
  • Make sure each Question includes the entire text of the question and make sure each answer includes the entire text of the answer. The entire question text and answer text may be displayed.
  • Question and answer content may not be displayed as a rich result if it contains any of the following types of content: obscene, profane, sexually explicit, graphically violent, promotion of dangerous or illegal activities, or hateful or harassing language.
  • All FAQ content must be visible to the user on the source page.

In this post, I am going to show you how to add and test FAQ schema code on any web page without the need of coding knowledge.

There are two ways of adding schema markup to your site, first method is using a plugin and the second is adding manually.

Steps To Add FAQ Schema

Step 1: In your WordPress Dashboard, go to any post or page you want to add FAQ Schema to. Make sure that custom fields are checked in the Screen Options at the top.

Custom Field Option

Step 2: Now, we create the markup code required for the FAQs to appear in the search results.

Note: The content you are going to put in the schema should be same as it appears on your post or page.

<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [{
"@type": "Question",
"name": "INSERT QUESTION TEXT HERE",
"acceptedAnswer": {
"@type": "Answer",
"text": "INSERT ANSWER TEXT HERE"
}
}, {
"@type": "Question",
"name": "INSERT QUESTION TEXT HERE",
"acceptedAnswer": {
"@type": "Answer",
"text": "INSERT ANSWER TEXT HERE"}
}]
}
</script>
view raw faq schema hosted with ❤ by GitHub

Copy the code format and replace it with your own questions and answers.

Step 3: Go to the post or page dashboard and scroll down to where you can see the custom field boxes and add a new custom field.

New Custom Field Addition

Now, give the name value as ‘schema’ and add your FAQ code as ‘value’.

Add New Custom Field

Click Add Custom Field and scroll up to the top of the page and then click Update.

Step 4: Go to appearance, click on theme editor and go to header.php. Copy and paste the following code before </head> tag.

<?php
$schema = get_post_meta(get_the_ID(), 'schema', true);
if(!empty($schema)) {
echo $schema;
}
?>
view raw header-php-code hosted with ❤ by GitHub

Save your header.php and then reload your page, you will see the schema markup just before the closing tag.

Testing Your Code

Now, go to to Google’s Rich Results tool and enter the URL you have added FAQ schema.

If everything is correct, you will see a green tick next to “FAQ”.

When you click on the unnamed item you will see your questions and answers.

FAQ Schema backend

Now It's Your Turn

Now I would like to turn it over to you

Are you going to add FAQ schema markup to your page or post using the above method?

Or maybe you have a question about something you read.

Either way, let me know by leaving a comment below right now.

Leave a Comment

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

Scroll to Top

ARE YOU IN?

Learn about the exclusive wordPress tips and insights. join and stay ahead of the pack.

get exclusive wordpress tips & tricks

Learn about the exclusive wordPress tips and insights. join and stay ahead of the pack.

Share
Tweet
Share
WhatsApp