Manually Set Up Schema Markup

Guide to Manually Set Up Schema Markup in WordPress

Schema markup, or structured data, is a form of microdata that helps search engines understand your website’s content. Adding to your HTML improves how your page is represented in search engine results pages (SERPs). This detailed guide will help you manually set up schema markup in WordPress, enhancing your site’s SEO and visibility.

What is Schema Markup?

Schema markup is a semantic vocabulary of tags (or microdata) that you add to your HTML. These tags help search engines return more informative results for users. For example, a page with a recipe can have schema markup that provides information about the ingredients, cooking time, and nutritional information. When search engines understand these details, they can display ‘rich snippets’ in SERPs. Rich snippets are enhanced search results that include additional information, such as images, star ratings, and more, making your listing more attractive and increasing the likelihood of users clicking through to your site.

Benefits of Schema Markup

  1. Enhanced SERP Display: Schema markup can transform your search results with rich snippets, including eye-catching images, star ratings, and more, making your website stand out.
  2. Improved SEO: Schema markup is not a direct ranking factor, but it can improve your click-through rate (CTR), positively impacting your rankings.
  3. Better User Experience: This feature directly provides users with more information in the search results, which can lead to better engagement.

Types of Schema Markup

There are several types of schema markups you can implement, including:

  • Article
  • Product
  • Event
  • Organization
  • Local Business
  • Recipe
  • Review

Preparing for Schema Markup

Before you add schema markup to your WordPress site, you must identify the schema you need for your content. Use Google’s Structured Data Markup Helper to generate the necessary schema code.

Manually Set Up Schema Markup in WordPress

To manually set up schema Markup, you need to know some coding and functionality of WordPress configuration, such as locating the file, inserting the script, and knowing about the backup. You must ensure that you have already taken a backup of your WordPress website before making changes to the PHP file.

Step 1: Create a Child Theme

Using a child theme for custom modifications is always a good practice to ensure your changes are precise during theme updates.

Create a folder for your child theme in wp-content/themes.

Create a style.css file in this folder with the following content:


Theme Name: Your Theme Name Child

Template: your-theme-name


Create a functions.php file in the same folder to enqueue the parent theme’s styles and your custom scripts:


add_action( ‘wp_enqueue_scripts’, ‘enqueue_parent_styles’ );

function enqueue_parent_styles() {

    wp_enqueue_style( ‘parent-style’, get_template_directory_uri().’/style.css’ );



Step 2: Add Schema Markup to Your Theme

Identify where you want to add the schema markup. For example, if you’re adding an Article schema, locate the single post template file, typically single.php or content-single.php.

Edit the template file and add the necessary schema markup. For an Article schema, it might look something like this:

<article itemscope itemtype=””>


        <h1 itemprop=”headline”><?php the_title(); ?></h1>

        <meta itemprop=”author” content=”<?php the_author(); ?>” />

        <meta itemprop=”datePublished” content=”<?php the_time(‘c’); ?>” />


    <div itemprop=”articleBody”>

        <?php the_content(); ?>



Step 3: Validate Your Schema Markup

After adding the schema markup to your template files, it’s important to validate it to ensure no errors. Rest assured, Google’s Structured Data Testing Tool is there to help you test the specific URL or code snippet, giving you the confidence that your markup is error-free.

  1. Go to the Structured Data Testing Tool and enter the URL of the page you modified or paste your code snippet.
  2. Check for errors and warnings. If any are found, make the necessary adjustments.

Step 4: Monitor and Maintain

Schema markup requires ‘ongoing monitoring’ to ensure it’s correctly implemented and up-to-date with the latest standards. Periodically validate your schema markup and adjust as needed. Ongoing monitoring is essential as it can help you identify any changes in the standards or your website’s content that might require updates to your schema markup.


Implementing schema markup manually in WordPress may initially seem complex, but with this comprehensive guide, you can enhance your SEO and provide better search engine results. Following the steps outlined, you can confidently ensure your content is correctly marked up, improving visibility and user engagement. Remember to regularly validate your markup and stay updated with the best practices in structured data to maintain optimal performance.