How To Manually Add Structured Data Markup to your WordPress Site

Dragonfly Web - Structured Data

Table of Contents


Structured data markup is a text format that is added to your webpage HTML so Google can make sense of the content. By adding structured data to your web pages, it provides Google with detailed information that classifies the content, and in return, it appears as a Rich Result

Rich Results, also known as Rich Snippets, appear in Google results with more details, such as recipes for food dishes, reviews for a product, job listings and much more. 

Dragonfly Web - Rich Snippets

By adding structured data it can provide users with more information, which, in turn, can lead to a higher click-through rate. Therefore, adding this to your website will help attract more visitors. 

Structured Data Types

Before making any modifications to your website, you must identify which type of data you want to include on your web pages. 

There are plenty of different types available, such as Books, Reviews, FAQ, Local Business and much more. Visit Google documentation and click on one of the features. Here, it will provide you with information on how the structured data works, different components you can add to it, along with an example of the JSON structure data snippet. 

Dragonfly Web - Structured Data

Review the JSON-LD snippet for that feature, then copy the text it to your favourite code editor.

Modify the JSON text to suit the content of your web pages. As an additional measure, ensure the JSON is free from any syntax errors. I use to check this. Copy your code to Jsonlint and click ‘Validate JSON’. 

When you are satisfied with it, it’s time to add it to your WordPress site. 


Applying Structured Data to your WordPress Site

Now, you need to add the data to the HTML head of each webpage on your site. Without editing the core theme files of your website, you need an easy way to achieve this. To do so, download and activate a WordPress plugin called Headers and Footer Scripts. This is a lightweight plugin that allows you to input your structured data into the head of each webpage. 

Next, locate and edit one of your web pages, and scroll down until you see the ‘Insert Script to <head>’ section. 

Dragonfly Web - Add Structured data to the head

Enter your structured data here and click ‘Update’. 


After you have successfully added structured data to all your relevant web pages, you need to test it to ensure it’s working correctly. 

Google provides an excellent tool for this purpose called Rich Results Test

Dragonfly Web - Rich Results to test Structured Data

Enter the URL for one of the webpages where you’ve applied changes to, and click ‘Test URL’. 

After the test is complete, it will provide messages to notify you if your changes have been applied successfully. It will also show you if there are any errors and provide guidance on how to fix them. 

Perform this test for every webpage where you have added JSON text.

Dragonfly Web - Rich Results Test


While there are many WordPress plugins available for this purpose, if you prefer not to add extra bloatware to your website, follow these steps, and you’ll be able to manually add structured data to your website within 30 minutes. 

If this process seems cumbersome and you’d rather have a professional review your website to determine if your services and products are optimised for rich snippets, then schedule a free SEO audit with us.