Set structured data markup In WordPress and CMS

Set structured data markup In WordPress and CMS

Structured data markup is a way to annotate website content to provide additional context and meaning to search engines, enabling them to better understand and represent the content in search results. Implementing proper structured data can enhance the way search engines interpret and display your web pages. This guide will explain what structured data is, its benefits, and provide step-by-step instructions for adding structured data markup to WordPress and other content management systems (CMS).

What is Structured Data Markup?

Structured data markup is code that is added to website content to describe the content in a machine-readable way. It uses vocabulary that search engines like Google understand. Some types of structured data include:

  • Article schema – For marking up blog posts and articles
  • Product schema – For ecommerce product pages
  • FAQ schema – For frequently asked questions pages
  • Job posting schema – For job listings
  • Local business schema – For local business info

By adding this structured data, you enable search engines to better comprehend what a web page is about. This can result in your content appearing in rich search results – also called rich snippets – which stand out more to users.

Structured data markup does not directly influence rankings. However, by improving clickthrough rates from search results, over time it may indirectly help pages perform better in search. Primarily though, structured data enhances the user experience and enables search engines to represent your content better.

Benefits of Structured Data Markup

Implementing structured data markup on your WordPress site can provide the following key benefits:

Enhanced Search Appearance

With structured data, your content may display in rich search results – also called rich snippets – which stand out more to users and can increase clickthrough rates. For example, a blog post could show a short description, article publish date, author name, and thumbnail image.

Rich results help you effectively showcase content directly in SERPs (search engine results pages).

Increased Clickthrough Rates

The rich presentation enabled by structured data tends to achieve higher CTRs (clickthrough rates) from search listings. For example, Product schema could display product images, star ratings, and prices directly in search results. This provides users more information so they are more likely to click and visit your site.

More Traffic and Revenue

Higher clickthroughs ultimately enable you to drive more qualified visitors to your site who are likely to convert and generate revenue. So properly implemented structured data can lead to increased website traffic and sales.

Enhanced Indexing and Ranking Potential

Structuring your content can help search engines better interpret and classify it, leading to better indexing which lays the foundation for good rankings. While structured data doesn’t directly influence core ranking factors, the associated traffic and conversion boosts may indirectly improve search positions over time.

With these potential benefits in mind, let’s look at how to add structured data to WordPress sites.

Getting Started with Structured Data Markup

Before diving into specifics for WordPress, let’s review some structured data basics…

There are two main ways to implement structured data markup on web pages:

1. JSON-LD Code

JSON-LD is a syntax that enables embedding structured data JSON (JavaScript Object Notation) within the HTML code. JSON-LD provides a standard method for annotating content with vocabulary.

Here is an example JSON-LD schema:

This structure follows guidelines to describe an Article, including fields like headline, author, publisher, and more.

2. Microdata Syntax

Microdata provides another standard way of annotating HTML directly within the elements on a page. For example:

In most cases today, JSON-LD structured data tends to be recommended since it keeps the markup separate from page content. JSON-LD also provides more flexibility in terms of what can be marked up.

Now let’s see how we can easily integrate JSON-LD structured data in WordPress sites…

Adding Structured Data to WordPress

There are two primary methods for implementing structured data markup on WordPress sites:

  1. Using a dedicated WordPress SEO or structured data plugin
  2. Manually adding JSON-LD script tags in your theme code

Let’s explore both approaches…

Method 1: Using a Structured Data Plugin

The easiest way to add schema markup on WordPress is through a dedicated plugin. Structured data plugins provide user-friendly interfaces and settings to auto-generate the necessary schema code for your pages.

Some top structured data plugins include:

  • Rank Math SEO: Provides extensive options for adding many types of schema including Article, local business, FAQ, products, and more. Plus built-in rich snippet testing.
  • Yoast SEO: Auto-generates basic schema but with fewer options compared to RankMath. Integrates directly with Yoast’s SEO plugin.
  • SEOPress PRO: SEOPress is another all-in-one SEO plugin with solid structured data functionality. Provides schema wizard and tester.
  • Schema: Basic open-source structured data plugin specifically focused on schema generation. Supports the major content types.

The benefit of plugins is they handle all the technical work and schema code behind the scenes. You simply provide info through the settings to auto-generate the markup.

For example, with Rank Math’s schema settings you’d just enter details like the Article headline, featured image, author name, etc. And their system auto-generates the JSON-LD markup for you.

Let’s take a hands-on look at setting up Article schema with the Rank Math plugin…

Step 1: Install and Activate Rank Math Plugin

If you don’t already have Rank Math installed, first download the plugin from their website or the WordPress plugin directory. Follow the standard process to install and activate the plugin.

Step 2: Configure Site-Wide Schema Settings

To begin structuring your content, go to the main plugin settings page under RankMath > General Settings.

Expand the ‘Structured Data’ tab on the left:

Configure Site-Wide Schema Settings

Under the ‘General’ section, we first want to make sure the box is checked to enable JSON schema output.

Next, choose which types of pages you want schema automatically output on across your site. Check all that apply or enable ‘Output schema markup for all pages’. Common options to enable include:

  • Front Page
  • Posts
  • Post Archives
  • Attachment Pages

You can leave the ‘Schema Type’ set to ‘Default Schema’ for now – we’ll choose specific schema types per content item when configuring them below.

Finally, click the ‘Save General Settings’ button at the bottom to save your sitewide preferences.

Step 3: Add Article Schema to Blog Posts

With the basics configured, now we’ll look at adding Article schema specifically to blog posts.

Navigate to any blog post editor within your WordPress dashboard.

Scroll down and expand the ‘Schema’ panel:

Add Article Schema to Blog Posts

Check the box for ‘Make this Post an Article’.

Then fill in appropriate values for the fields:

  • Headline – The article headline or title
  • Date Published – Automatically populated by default
  • Date Modified – Can specify an update date or leave blank
  • Featured Image – Can choose the featured post image to showcase
  • Author Name – Defaults to author or manually enter a name

Leave other optional fields blank for now.

Click ‘Save Post’ or ‘Update’ when done to save your changes.

RankMath will now automatically generate Article JSON-LD schema for that post using the details you provided.

Repeat this process to add Article markup across all blog content. The plugin seamlessly handles outputting the proper schema code on the frontend.

Step 4: Test Structured Data Generation

To confirm your structured data is being output correctly, use Google’s Structured Data Testing Tool.

Enter the URL of any post or page with schema enabled. This tool will analyze the page and display what schema is detected, along with any errors.

For example, entering a blog URL should show the Article schema, headline, images, and other fields we specified in RankMath.

If any issues display, revisit the schema plugin settings to troubleshoot and correct as needed.

And that’s it! With those steps complete, you have successfully implemented structured data markup on your WordPress site through a dedicated SEO plugin.

Method 2: Manually Adding JSON-LD Schema

The other option is to manually add structured data JSON-LD script tags directly within your theme code. This approach provides more customization flexibility and control vs relying on a plugin. However, it does require more development work upfront.

Here is an overview of how to manually add markup:

Step 1: Find Theme File to Edit

First, you need to determine the most appropriate WordPress theme template file to add schema code into.

For site-wide structured data that should appear on all pages, the main header.php or footer.php theme file is generally best.

For schema related to specific content types, choose the corresponding template file. For example:

  • single.php: Single blog posts
  • page.php: Individual pages
  • category.php: Category archives
  • home.php: Blog homepage
  • author.php: Author page

Choose whichever file makes sense for the type of schema data you want to output.

Step 2: Add JSON-LD Snippet

Next, open the selected file and look for an appropriate location to add a <script> tag. Typically right before the closing </head> or above the ending </body> tag works well.

Then insert a JSON-LD script similar to the Article example we looked at earlier:

Step 3: implement Additional Schema Types

To add other kinds of schema, you would just define additional JSON-LD snippets in your theme files. For example:

Add schema snippets into whatever relevant template files makes sense.

Step 4: Test Structured Data

Again you can validate that your JSON-LD schema is being detected properly through testing tools like Google’s Structured Data Tool covered earlier.

The manual code approach provides more customization control vs a structured data plugin. However, it does require more development effort to implement vs a plug-and-play addon.

Choose the method that best fits your site needs and technical capabilities.

Adding Structured Data to Other CMS Platforms

Beyond WordPress, structured data can be beneficial for any content site. Here is some guidance on implementing schema within other popular CMS platforms:


For Joomla sites, there are a few structured data extensions you can use:

  • Joomla Tags Machine – Includes both JSON-LD and Microdata schema options.
  • RSeo – Focused JSON-LD schema generation for Joomla articles and other content types.

You can also manually add script tags by editing your site’s underlying PHP template files directly, as outlined in the steps above. Add JSON-LD snippets into key templates like article layouts, category pages, and so on.

Testing validation is the same using Google’s tool to check markup.


For Drupal, there are modules like Metatag and Article that can dynamically output schema metadata.

The Metatag module also supports some basic schema generation functionality.

You may need a combination of addons to markup all desired content types. As always, validate through testing tools.


Magento also has various extensions for adding schema markup including:

Follow the module documentation to configure and add product schema, review markup, article, and more across your Magento catalog and content pages.

And use Magento’s built-in schema validation through Marketing > SEO & Search > Site Map.

Other Platforms

Most CMS platforms provide some method of integrating schema either through addons or custom code snippets. Refer to documentation for your specific platform.

At a minimum, direct code edits to theme template files can enable manually adding JSON-LD script tags, following the same concepts covered above.

Structured Data Markup Examples

To give you additional ideas and use cases, here are some examples of common schema types you can implement:

Articles/Blog Posts

Article schema should be added to all blog entries and news articles to enhance search appearance. Typical fields as we saw earlier include:

  • Headline
  • Date published
  • Date updated
  • Featured image
  • Author name
  • Publisher name

Reference the official Article schema documentation for other supported properties.

Local Businesses

Local business schema markup is important for enhancing search visibility and prominence for service area related searches.

Typical local business schema fields:

  • Business name
  • Address
  • Phone number
  • Price rating
  • Opening hours

See the LocalBusiness schema for specifics.


Ecommerce sites should markup their product pages with detailed product schema:

  • Product name
  • Description
  • Image(s)
  • SKU
  • Brand name
  • Price
  • Availability
  • Reviews and ratings
  • Related products

Check Google’s guide on marking up products for recommendations.


Using FAQ schema for support and documentation pages helps search engines interpret the questions and answers:

  • Page labeled as FAQPage
  • Questions marked up with name and acceptedAnswer fields
  • Answers annotated as Answer type

See FAQ schema examples for syntax specifics.

Jobs / Careers Pages

Job posting schema helps make open positions more visible to prospective candidates:

  • Job title
  • Hiring organization
  • Location
  • Job description
  • Salary
  • Application URL
  • Date posted

See jobPosting schema for other typical fields.

These are just a sampling of schema types that can be applicable. Refer to the [full list of entities](

Latest Posts

Leave a Comment