š In this article, weāll talk more about what rich snippets are and how you can use them. Then weāll show you how to use rich snippets in WordPress. Letās get to it!
What are rich snippets?
When you view a Search Engine Results Page (SERPs), youāll notice several types of entries. A basic result includes a link to a page, a title, and a meta description:
![How to Use Rich Snippets in WordPress: Beginner's Guide 3 A basic search result as we learn how to make rich snippets in WordPress.](https://iotvnaw69daj.i.optimole.com/cb:n2y9~6666f/w:1532/h:361/q:mauto/f:avif/https://www.codeinwp.com/wp-content/uploads/2023/11/basic-search-result-1.png)
Those types of results are the bread and butter of search engines. However, Google also includes several other types of entries. Rich snippets add extra elements to ābaseā results, such as images. For a recipe, you get components such as cooking time, number of reviews, and ratings.
![How to Use Rich Snippets in WordPress: Beginner's Guide 4 An example of a rich snippet.](https://iotvnaw69daj.i.optimole.com/cb:n2y9~6666f/w:1723/h:450/q:eco/f:avif/https://www.codeinwp.com/wp-content/uploads/2023/11/rich-snippet-1.png)
![How to Use Rich Snippets in WordPress: Beginner's Guide 5 An example of a rich snippet.](https://iotvnaw69daj.i.optimole.com/cb:n2y9~6666f/w:1723/h:450/q:mauto/f:avif/https://www.codeinwp.com/wp-content/uploads/2023/11/rich-snippet-1.png)
There are a lot of types of rich snippets, depending on what they showcase. Itās not only recipes. Search engines have rich snippets for books, reviews, posts, videos, and dozens of other types of content.
Book listings on Amazon, for instance, offer interesting tidbits like the bookās rating, the number of reviews, its current price, and if itās in stock.
![How to Use Rich Snippets in WordPress: Beginner's Guide 6 A rich snippet for a product.](https://iotvnaw69daj.i.optimole.com/cb:n2y9~6666f/w:1403/h:383/q:eco/f:avif/https://www.codeinwp.com/wp-content/uploads/2023/11/rich-snippet-book-1.png)
![How to Use Rich Snippets in WordPress: Beginner's Guide 7 A rich snippet for a product.](https://iotvnaw69daj.i.optimole.com/cb:n2y9~6666f/w:1403/h:383/q:mauto/f:avif/https://www.codeinwp.com/wp-content/uploads/2023/11/rich-snippet-book-1.png)
Search engines donāt generate rich snippets automatically. You need to ātellā the search engine what kind of content itās dealing with and provide the contextual information it needs for the snippet. That is possible thanks to schema markup.
An introduction to schema markup
Schema markup is a type of code you add to a pageās HTML. The markup gives search engines the information they need to generate rich snippets.
There are hundreds of types of schema for different content. The options at your disposal are microdata, RDFa, and JSON-LD. This enables you to choose the best type of markup depending on how you code your site.
To give you an example of how schema works, hereās the markup for a review page using JSON-LD, going inside script tags in the pageās header:
Code language: HTML, XML (xml)
<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Product", "aggregateRating": { "@type": "AggregateRating", "ratingValue": "3.5", "reviewCount": "11" }, "description": "Big white fride. Very cool.", "name": "Kenmore White 17" Fridge", "image": "kenmore-fridge-17in.jpg", "offers": { "@type": "Offer", "availability": "https://schema.org/InStock", "price": "300.00", "priceCurrency": "USD" }, "review": [ { "@type": "Review", "author": "John", "datePublished": "2023-04-01", "reviewBody": "The fridge wasn't cool enough.", "name": "Uncool", "reviewRating": { "@type": "Rating", "bestRating": "5", "ratingValue": "2", "worstRating": "1" } </script>
That code would translate to a rich snippet that looks like this:
![How to Use Rich Snippets in WordPress: Beginner's Guide 8 A rich snippet in WordPress.](https://iotvnaw69daj.i.optimole.com/cb:n2y9~6666f/w:1024/h:290/q:eco/f:avif/https://www.codeinwp.com/wp-content/uploads/2023/11/fridge-snippet-1.png)
![How to Use Rich Snippets in WordPress: Beginner's Guide 9 A rich snippet in WordPress.](https://iotvnaw69daj.i.optimole.com/cb:n2y9~6666f/w:1024/h:290/q:mauto/f:avif/https://www.codeinwp.com/wp-content/uploads/2023/11/fridge-snippet-1.png)
If this looks complicated, donāt worry. Even if you lack coding knowledge, itās relatively easy to add schema markup to a WordPress site. You can find examples of the markup you need and add specific details for each page.
The alternative is to use a plugin that completes all the work for you. This is typically the best option, as it saves you from having to create rich snippets in WordPress for every page.
How to use rich snippets in WordPress (three steps)
Since adding schema markup manually can be incredibly time-consuming, weāre going to focus on how the process works with plugins. Letās start by deciding which plugin to use.
Step 1: Choose a schema markup plugin š
There are several plugins you can use to add rich snippets in WordPress. Some developers gear their plugins toward mainly helping you add schema markup. Others, such as Yoast SEO, do this as a bonus while assisting you with other aspects of SEO.
Since Yoast SEO is the most popular SEO plugin in the market, itās the one weāll show you how to use to add rich snippets in WordPress.
If you donāt want to use Yoast, other plugins we recommend include Rank Math (another popular SEO plugin) and Schema & Structured Data for WP & AMP. Once you settle on a plugin, move on to the next step.
Step 2: Configure the available schema options āļø
If you use Yoast SEO, you can configure a default type of schema for every post. By default, Yoast SEO will use the Web Page schema for pages and the Article schema for posts.
To change that configuration, go to Yoast SEO ā Settings ā Content types. Select either Posts or Pages and look for the Schema section. Here you can change the default type of schema for either posts or pages.
![How to Use Rich Snippets in WordPress: Beginner's Guide 10 Default schema types in Yoast for rich snippets in WordPress.](https://iotvnaw69daj.i.optimole.com/cb:n2y9~6666f/w:1537/h:1164/q:eco/f:avif/https://www.codeinwp.com/wp-content/uploads/2023/11/default-schema-types-1.png)
![How to Use Rich Snippets in WordPress: Beginner's Guide 11 Default schema types in Yoast for rich snippets in WordPress.](https://iotvnaw69daj.i.optimole.com/cb:n2y9~6666f/w:1537/h:1164/q:mauto/f:avif/https://www.codeinwp.com/wp-content/uploads/2023/11/default-schema-types-1.png)
This configuration comes in handy if your website focuses on a specific type of content such as reviews, recipes, or tech articles (yes, thatās an option available in Yoast).
Note that Yoast SEO doesnāt include all the existing types of schema. It supports the most popular options. However, if youāre working with highly specific types of content, you may need to look for a plugin that focuses solely on that schema markup.
After changing the configuration, save the new settings. Now letās add rich snippets in WordPress for individual pages or posts ā instead of the global settings we just configured.
Step 3: Add schema markup to individual pages šØāš»
As you may know, Yoast gives you tips on how to optimize each page for search engines. If you take a look at the Yoast SEO widget below or next to the editor in WordPress, youāll see a tab that says Schema.
The Schema tab enables you to specify what type of content youāre working on. This tells the plugin what rich snippets for WordPress it should generate.
![How to Use Rich Snippets in WordPress: Beginner's Guide 12 The schema tab in Yoast SEO for making rich snippets in WordPress.](https://iotvnaw69daj.i.optimole.com/cb:n2y9~6666f/w:1505/h:950/q:eco/f:avif/https://www.codeinwp.com/wp-content/uploads/2023/11/schema-tab-1.png)
![How to Use Rich Snippets in WordPress: Beginner's Guide 13 The schema tab in Yoast SEO for making rich snippets in WordPress.](https://iotvnaw69daj.i.optimole.com/cb:n2y9~6666f/w:1505/h:950/q:mauto/f:avif/https://www.codeinwp.com/wp-content/uploads/2023/11/schema-tab-1.png)
Note that the defaults you see here will be the same ones you configured during step two. If the content youāre working on matches that default, skip this step. Otherwise, select a page or article type and navigate the schema options Yoast offers:
- Article
- Blog Post
- Social Media Posting
- News Article
- Advertiser Content Article
- Satirical Article
- Scholarly Article
- Tech Article
- Report
![How to Use Rich Snippets in WordPress: Beginner's Guide 14 Configuring what type of schema to use for rich snippets in WordPress.](https://iotvnaw69daj.i.optimole.com/cb:n2y9~6666f/w:1476/h:901/q:eco/f:avif/https://www.codeinwp.com/wp-content/uploads/2023/11/types-schema-1.png)
![How to Use Rich Snippets in WordPress: Beginner's Guide 15 Configuring what type of schema to use for rich snippets in WordPress.](https://iotvnaw69daj.i.optimole.com/cb:n2y9~6666f/w:1476/h:901/q:mauto/f:avif/https://www.codeinwp.com/wp-content/uploads/2023/11/types-schema-1.png)
The schema choices for pages differ from whatās available for posts:
- Web Page
- Item Page
- About Page
- FAQ Page
- QA Page
- Profile Page
- Contact Page
- Medical Web Page
- Collection Page
- Checkout Page
- Real Estate Listing
- Search Results Page
![How to Use Rich Snippets in WordPress: Beginner's Guide 16 Available schema types.](https://iotvnaw69daj.i.optimole.com/cb:n2y9~6666f/w:1726/h:828/q:eco/f:avif/https://www.codeinwp.com/wp-content/uploads/2023/11/Work-1.jpg)
![How to Use Rich Snippets in WordPress: Beginner's Guide 17 Available schema types.](https://iotvnaw69daj.i.optimole.com/cb:n2y9~6666f/w:1726/h:828/q:mauto/f:avif/https://www.codeinwp.com/wp-content/uploads/2023/11/Work-1.jpg)
When youāre done, save the changes to the page or post and thatās it. Once the content starts to rank in search engines, youāll see it appear in the form of a rich snippet.
Our conclusion on implementing rich snippets in WordPress š§
Adding rich snippets in WordPress is simple, at least if you use plugins. Rich snippets require you to use schema markup. That means you need to add code to the header of each page you want to appear as a rich snippet.
š With the right plugin, you can skip adding schema markup manually. Hereās a recap of how the process works, step by step:
- Choose a schema markup plugin (we recommend Yoast SEO) š
- Configure the available schema options āļø
- Add schema markup to individual pages šØāš»
Do you have questions about how to add rich snippets in WordPress? Letās talk about them in the comments section below!
Keep reading the article at CodeinWP. The article was originally written by John Hughes on 2023-12-05 07:00:00.
The article was hand-picked and curated for you by the Editorial Team of WP Archives.