Schema, Structured Data & Local SEO

Understanding StrUctured Data

Structured data is content input into a specific format (a schema), written in such a way that search engines understand it — defined by Schema.org.

Search engines work hard to understand the content of a page. Major search engines (Google, Microsoft, Yahoo and Yandex) use structured data found on the web to understand the content of a page in greater context, as well as gather information about the web and the world in general.

Structured data is used to obtain rich search results

Search Results vs Rich Results

A typical Google search result will display a page title, URL and description. However a Rich Result, one that utilizes structured data in schema markup, will have images, reviews, dates and times, hours of operation, and more depending on the type of result.

How To Add Structured Data to WordPress

By default, Yoast SEO adds general structured data:

Since the 11.0 release, Yoast SEO builds a full structured data graph for every post or page on your site! A graph is a complete piece of structured data with well-defined connections to all the different parts. Search engines now not only know what all the parts mean but also how they fit together. more info here

Note: Yoast SEO builds on WordPress’s Gutenberg Block Editor to implement structured data from content. This feature will be included in an upcoming 3.0 release of the Q4 Framework.

TestING Structured Data

Google’s Structured Data Testing Tools:

  • https://search.google.com/test/rich-results
  • https://search.google.com/structured-data/testing-tool/u/0/

Where to Put Custom Schema Code in WordPress

Structured data can be added our sites in a few different ways, and a few different places – depending on what we are trying to achieve.

Generally speaking – there are 2 overall types of data we want to add:

  1. Organization data – per site
  2. Content data – per page

Organization Data

According to Google – this should reside on the home page, or on a contact page.

Replace BedAndBreakfast in the snippet below with the following as-needed.

  • If it is a Bed & Breakfast or Inn, use https://schema.org/BedAndBreakfast
  • If it is a Hotel, use https://schema.org/Hotel
  • If it is a Resort, use https://schema.org/Resort
  • If it is a Vacation Rental, or any other type that does not fit the above options, use https://schema.org/LodgingBusiness
  • If it is a Last Resort, use https://schema.org/PapaRoach

Basic Schema.org Code Template

<div style="display: none;">
<div itemscope itemtype="https://schema.org/BedAndBreakfast">
<div itemprop="name">OFFICIAL BUSINESS NAME</div>
<a itemprop="address" itemscope itemtype="https://schema.org/PostalAddress" href="/directions/"><span itemprop="streetAddress">STREET ADDRESS</span>
<span itemprop="addressLocality">CITY</span>, <span itemprop="addressRegion">STATE [2-LETTER ABBREVIATION]</span>, <span itemprop="postalCode">ZIP CODE</span>
<span itemprop="addressCountry">United States</span></a>
<span itemprop="telephone">PRIMARY BUSINESS PHONE [PREFER LOCAL #]</span>
<span itemprop="email">PRIMARY BUSINESS EMAIL</span>
<span itemprop="image">URL OF LOGO FROM WP MEDIA GALLERY</span></div>
</div>

A REAL-WORLD EXAMPLE:
<div style=”display: none;”>
<div itemscope itemtype=”https://schema.org/BedAndBreakfast”>
<div itemprop=”name”>The Orchard Inn</div>
<a itemprop=”address” itemscope itemtype=”https://schema.org/PostalAddress” href=”/directions/”><span itemprop=”streetAddress”>100 Orchard Inn Lane</span>
<span itemprop=”addressLocality”>Saluda</span>, <span itemprop=”addressRegion”>NC</span>, <span itemprop=”postalCode”>28773</span>
<span itemprop=”addressCountry”>United States</span></a>
<span itemprop=”telephone”>(828) 749-5471</span>
<span itemprop=”email”>innkeeper@orchardinn.com</span>
<span itemprop=”image”>https://orchardinn.com/wp-content/uploads/2017/05/orchard-inn-footer-logo.png</span></div>
</div>

More Advanced Schema

IF you have the additional info (business hours, latitude and longitude), use it, if not, that’s okay.

<div style="display: none;">
<div itemscope itemtype="https://schema.org/BedAndBreakfast">
<div itemprop="name">OFFICIAL BUSINESS NAME</div>
<a itemprop="address" itemscope itemtype="https://schema.org/PostalAddress" href="/directions/"><span itemprop="streetAddress">STREET ADDRESS</span>
<span itemprop="addressLocality">CITY</span>, <span itemprop="addressRegion">STATE [2-LETTER ABBREVIATION]</span>, <span itemprop="postalCode">ZIP CODE</span>
<span itemprop="addressCountry">United States</span></a>
<span itemprop="telephone">PRIMARY BUSINESS PHONE [PREFER LOCAL #]</span>
<span itemprop="email">PRIMARY BUSINESS EMAIL</span>
<span itemprop="image">URL OF LOGO IMAGE FILE FROM WORDPRESS MEDIA GALLERY</span>
<meta itemprop="openingHours" style='display: none' content="Mo 08:00-18:00" />
<meta itemprop="openingHours" style='display: none' content="Tu 08:00-18:00" />
<meta itemprop="openingHours" style='display: none' content="We 08:00-18:00" />
<meta itemprop="openingHours" style='display: none' content="Th 08:00-18:00" />
<meta itemprop="openingHours" style='display: none' content="Fr 08:00-18:00" />
<meta itemprop="openingHours" style='display: none' content="Sa 08:00-18:00" />
</div>
<div itemtype="https://schema.org/GeoCoordinates" itemscope="" itemprop="geo">
<meta itemprop="latitude" content="LATITUDE" />
<meta itemprop="longitude" content="LONGITUDE" /></div>
</div>

[Note: OpeningHours MUST use 24-hour time]

Additional To-Dos (via Yoast):

SEO > General > Company Info Tab
Under “Company or person” Select “Company” from the drop-down. Type in company’s official name. Add the official logo from client’s media gallery. Click “Save Changes”

SEO > Social
Paste in all applicable social links. Click “Save Changes”

Leave a Reply