WordPress Issues

Beginner’s Guide: How to Use Rich Snippets in WordPress

Written by Supriya Srivastava

Do you want to add Rich Snippets to your WordPress site?

Rich Snippets allow you to have custom search listings for specific content such as reviews, recipes, events, and more. These search listings will stand out and help you get more traffic to your site.

In this article, we will show you how to add rich snippets to your WordPress site step by step.

Beginner's Guide: How to Use Rich Snippets in WordPress

Why Use Rich Snippets on Your WordPress Site?

Rich snippets use schema markup to provide search engines with additional information about your content.

Search engine bots use this data to show additional information about your posts and pages in search results.

Rich Snippet Example

This helps make your posts and pages more unique in search results, which can improve your organic click-through rate and help you increase your blog traffic.

It also helps you build authority in your niche, as your site appears higher in search.

Rich snippets aren’t just for review sites or recipes. You can use rich snippets for events, products, people, videos, music, apps, articles, blog posts, and more.

Comment: It is important to know that adding schema markup to your website does not guarantee that Google will display it. Google may choose not to do this for some searches. However, adding schema markup helps Google understand your content and increases the chances of rich snippets appearing.

That being said, let us show you how to add rich snippets in WordPress. Just use the quick links below to go straight to the method you want to use.

  • Adding Rich Snippets to WordPress with a WordPress Plugin (Recommended)
  • Adding Rich Snippets to WordPress by Adding Code to WordPress

Method 1. Adding Rich Snippets to WordPress Using a WordPress Plugin

The Easiest Way to Add Rich Snippets in WordPress AIOSEO Placement It is the best WordPress SEO plugin in the market, used by over 3+ million websites.

AIOSEO

It helps you to optimize your site for search engines easily and for this you do not need to hire any SEO expert. Plus, you can set up rich snippets on your site in just a few clicks.

Comment: you will need it Pro version of AIOSEO Because it includes schema markup functionality and other features like XML sitemaps, redirection manager, and more. there is one free version Plugin you can use to get started.

The first thing you have to do is install and activate AIOSEO Placement For more details, see our beginner’s guide on how to install a WordPress plugin.

Upon activation, you will be immediately taken to the AIOSEO setup wizard. You have to click on the ‘Let’s Get Started’ button.

Click on Let's get started AIOSEO setup wizard

If the setup wizard doesn’t appear right away, just go to All in One SEO » Dashboard,

From here, you can click on the ‘Launch Setup Wizard’ button. This will walk you through the steps to install the plugin for your website.

AIOSEO Dashboard Launch Setup Wizard

As you go through the setup wizard, you will need to activate the ‘Advanced Rich Snippets + Schema Markup’ addon.

Simply check the box so that it turns blue, then click the ‘Save and Continue’ button.

Active Rich Snippets and Schema Markup Addon

On the last screen, you need to enter your license key and then click on the ‘Connect’ button.

You can find this information on the AIOSEO website under your account page.

enter aioseo license key

For more information, check out our ultimate guide on how to properly set up AIOSEO for WordPress.

after that you can go AIOSEO » Search Presence In your WordPress admin panel, and then click on the ‘Content Types’ tab.

Go to AIOSEO Search Appearance and click on Content Types

Then, you can set the schema markup type for your posts and pages.

Simply click on the ‘Schema Markup’ menu option, then you can choose the schema type from the drop-down.

You will be able to see the different types of content that you can create with the plugin. The list includes:

  • syllabus
  • the product
  • recipe
  • software / app
  • general question
  • Web Page
  • profile
  • Article

Clicking on any type of content will show you the available fields.

Default schema markup for posts

These settings will be the default settings when you add a new blog post. However, you can also change these on an individual post basis.

Below the post schema markup, you can also control the default schema for your pages.

Simply select ‘Schema Type’ from the drop-down. Then, you will have additional options for the schema type you selected.

Default schema markup for pages

When you have finished making changes, click on the ‘Save Changes’ button before leaving the page.

Adding rich snippet information to your posts and pages

Now, you can add schema information to your individual posts and pages so that they appear in search results with unique rich snippets.

To do this, simply open a blog post and scroll down to the bottom of the post editor. Here you will see a meta box named ‘AIOSEO Settings’.

You need to click on the ‘Schema’ tab and then click on the ‘Generate Schema’ button.

Click on Generate Schema button in AIOSEO

This will open the schema catalog. Simply click on the ‘Add Schema’ button next to the type of schema you want to add.

Select a schema type from the schema catalog

Now, depending on the option you have selected, different fields will be available to fill. For example, the ‘software’ schema type includes fields for name, operating system, price, description, review, and more.

Post schema markup for software applications

When you’re finished, click the ‘Add Schema’ button. Don’t forget to click ‘Update’ or ‘Publish’ on the post to save your changes.

Click on the Add Schema button

Adding schema markup to individual WordPress pages is similar. You need to open the page you want to edit and then scroll down to the ‘AIOSEO Settings’ meta box at the bottom of the page editor.

Then, click the ‘Schema’ menu option, click the ‘Generate Schema’ button, and select your page schema type from the schema catalog.

page schema example for web page

Various options will appear depending on the type of schema you have selected.

Just like above, when you’re finished, you’ll need to click the ‘Add Schema’ button and hit ‘Update’ or ‘Publish’ on the page to get your changes live.

Adding rich snippet information will make no difference to the front end of your WordPress blog. However, you will be giving search engine bots additional data to display alongside your posts and pages in search results.

Method 2. Adding Rich Snippets in WordPress by Adding Code

Another way to add rich snippets in WordPress is by adding code to WordPress. If you haven’t done so before, check out our guide on how to copy and paste code in WordPress.

Rich snippets or structured data markup can be written in three different vocabularies. These vocabularies are Microdata, RDFa, and JSON-LD. You can use any of them on your site. However, most beginners consider RDFa to be more beginner friendly.

Here is an example of a user’s About page in WordPress. Typically the page text will look something like this:

John Smith
<img src="johnsmith.jpg" alt="Photo of John Smith"/>
Support Technician
342 Acme Inc.
101 Washington Avenue
Eagleton IN 98052
(425) 123-4567
<a href="mailto:johnsmith@example.com">johnsmith@example.com</a>
Website:
<a href="http://www.example.com">example.com</a>

It can be easily adapted with Rich Snippets.

If you are familiar with HTML, you can easily understand the following example:

<div vocab="http://schema.org/" typeof="Person">
  <span property="name">John Smith</span>
  <img src="johnsmith.jpg" property="image" alt="Photo of John Smith"/>
  <span property="jobTitle">Support Technician</span>
  <div property="address"  typeof="PostalAddress">
    <span property="streetAddress">
      342 Acme Inc.
      101 Washington Avenue
    </span>
    <span property="addressLocality">Eagleton</span>,
    <span property="addressRegion">IN</span>
    <span property="postalCode">46818</span>
  </div>
  <span property="telephone">(425) 123-4567</span>
  <a href="mailto:johnsmith@example.com" property="email">johnsmith@example.com</a>
Website
  <a href="http://example.com" property="url">example.com</a>
</div>

For each content type, there are some special properties that need to be defined.

Schema.org is an organization that helps maintain standards for different types of content. You’ll find extensive documentation with examples for each schema content type on their website.

Here’s another example of a recipe with rich snippets.

<div vocab="http://schema.org/" typeof="Recipe">
  <span property="name">Mom's World Famous Banana Bread</span>
  By <span property="author">John Smith</span>,
    <img property="image" src="bananabread.jpg"
    alt="Banana bread on a plate" />
  <span property="description">This classic banana bread recipe comes
  from my mom -- the walnuts add a nice texture and flavor to the banana
  bread.</span>
  Prep Time: <meta property="prepTime" content="PT15M">15 minutes
  Cook time: <meta property="cookTime" content="PT1H">1 hour
  Yield: <span property="recipeYield">1 loaf</span>
  Ingredients:
  - <span property="recipeIngredient">3 or 4 ripe bananas, smashed</span>
  - <span property="recipeIngredient">1 egg</span>
  - <span property="recipeIngredient">3/4 cup of sugar</span>
  ...
  Instructions:
  <span property="recipeInstructions">
  Preheat the oven to 350 degrees. Mix in the ingredients in a bowl. Add
  the flour last. Pour the mixture into a loaf pan and bake for one hour.
  </span>
</div>

If you are manually adding rich snippets to your WordPress posts, you will need to manually add the HTML to WordPress. For more details, see our beginner’s guide on editing HTML in the WordPress code editor.

You may also need to refer to Google’s developer Resources on Structured Data To understand what properties are necessary for each content type.

Testing your rich snippets and schema markup

If you are adding rich snippets manually, you will want to make sure that you have properly added structured data to your WordPress website.

To check your Rich Snippets, just go here Google Structured Data Testing Tool, Then, you can run two separate tests to test your structured data.

First, click on the ‘Go to Rich Results Test’ button. This will see what rich results can be generated for your page.

Go to Rich Results Check

Then, enter your page or post URL in the box.

Next, click on the ‘Test URL’ button.

run rich result test

It will automatically generate a report to see which rich result features are likely to appear when that page or post is listed in search results.

It will give you any errors or warnings, so that you can repair your structured data. You can click the drop-down arrow next to any warning, and you’ll receive detailed instructions on how to fix it.

Rich result test result

After this, you can test your schema markup by going back to the Google Structured Data Testing Tools page.

Then, click on the ‘Go to Schema Markup Validator’ button.

Go to the Schema Markup Validator test

Next, enter your URL or code snippet in the ‘Test your structured data’ popup.

Then, click on the ‘Run Test’ button.

Enter URL or code and test structured data

The tool will automatically analyze your code to see if there are any errors.

You should see 0 errors on the right side of the page.

schema markup test results

We hope this article helped you learn how to use rich snippets on your WordPress site. You might also want to check out our guide on choosing the best domain registrar and our expert pick of the best AI chatbot software for your website.

 

About the author

Supriya Srivastava

My name is Supriya Srivastava, started to designed the website regarding to knowledgebase blogs about, WordPress issues, Direct Admin,cPanel and Cloudflare.

I scoured the web to find a resource that could help clients and other new WordPress users.