Victor M. Font Jr.

Add itemprop=“image” to WP Content Images

SEO thumbnail image, public domain photo from pixabay.comSearch engines like Google, Bing, Yahoo, and Yandex want to be in the know. They want to know what your content means, not just what it says. As a result, Google, Microsoft, and Yahoo came together in June, 2011 to announce a collaboration to create and support a standard set of schemas for structured data markup on web pages. The site they developed is Schema.org.

Schema markup is one of the latest evolutions in Search Engine Optimization (SEO). Schema markup is a vocabulary—a semantic vocabulary. It is code that you put on your website to help search engines return more illuminating results for users. These vocabularies represent entities, and the relationships between entities and actions. Schema markup can easily be extended through a well-documented extension model.

Why Good Schema Markup is Important

Websites that use schema markup rank better on Search Engine Results Pages (SERPs) than sites without markup. One study published by Searchmetrics determined that websites with markup rank an average of four positions higher in the SERPs than those without schema markup. This evidence may turn out to be anecdotal though and these results should be treated with caution. While there is apparently some correlation, it is not entirely clear that this higher result is due to the markup alone. However, if I can rank my sites four positions higher than my competitors by having proper schema markup, I'll take that any day of the week.

WordPress and Schema.org

There's no doubt that WordPress is the world's most popular web platform. Unfortunately for the millions of WordPress powered websites, it does not directly support schema markup. However, WordPress can be extended to include schema markup through plugins, or themes, or popular theme frameworks such as the Genesis Framework.

Genesis and Schema.org

Just as WordPress is the world's #1 web platform, the Genesis Framework is the #1 professional web developers' tool for building custom themes. There's good reason for its wide spread support. It's code is progressive, tight, and fast executing. It generates the latest standards of schema markup, and as of the Version 2.2.2 release, is fully Section 508, WCAG 2.0, and A11Y compliant. This means your content, when processed through the Genesis Framework, is accessible to a wider range of people with disabilities, including blindness and low vision, deafness and hearing loss, learning disabilities, cognitive limitations, limited movement, speech disabilities, photosensitivity and combinations of these.

So What Problem Are We Trying To Solve?

While Genesis is superior in every way when it comes to adding schema markup to your content, there is one thing it doesn't do. It might be best to let Genesis lead developer Nathan Rice explain:

Images that are inserted into the content of a post will need to have that property [itemprop=“image”] added manually. Genesis doesn’t generate the markup for anything in the post content, so that bit is up to you.

With that being said, if you are using the Genesis Framework on your site, you have three options.

  1. You can edit all of your posts and pages to manually add the schema markup to every one of your image tags.
  2. You can update the wp_posts table directly with SQL to add the schema markup to your content's image tags
  3. You can add the little snippet of code below to your theme's functions.php file and not worry about it again
/**
 * Add itemprop image markup to img tags
 * @author Victor M. Font Jr.
 * @link //victorfont.com/
 */
add_filter('the_content', 'vmf_add_itemprop_image_markup', 2);
function vmf_add_itemprop_image_markup($content)
{
	//Replace the instance with the itemprop image markup.
	$string = '<img';
	$replace = '<img itemprop="image"';
	$content = str_replace( $string, $replace, $content );
	return $content;
}

Accessibility & the Genesis Framework

Genesis Framework Accessibility ComplianceWith the release if Version 2.2 of the very popular Genesis Framework by StudioPress, you can help improve your website's Search Engine Results Page (SERP) ranking because it is now Web Content Accessibility Guidelines (WCAG) 2.0 compliant right out of the box.

A Brief History

In 1998, the United States Congress amended the Rehabilitation Act of 1973 to require Federal agencies to make their electronic and information technology (EIT) accessible to people with disabilities. The amended law authorized the Access Board to write the standards, which it published in 2000. Anticipating the need, the the World Wide Web Consortium (W3C) published its Web Content Accessibility Guidelines 1.0 [WCAG10] as a recommendation in May 1999. Published in 2008, WCAG 2.0 succeeds Wag 1.0. The W3C is an international community where Member organizations, a full-time staff, and the public work together to develop Web standards. W3C's mission is to lead the Web to its full potential by developing protocols and guidelines that ensure long-term growth for the Web. W3C's standards define key parts of what makes the World Wide Web work.

WCAG 2.0 & Developers

The WC3 WCAG 2.0 abstract states:

WCAG 2.0 covers a wide range of recommendations for making Web content more accessible. Following these guidelines will make content accessible to a wider range of people with disabilities, including blindness and low vision, deafness and hearing loss, learning disabilities, cognitive limitations, limited movement, speech disabilities, photosensitivity and combinations of these. Following these guidelines will also often make your Web content more usable to users in general.

For developers who believe that they are “only required” to meet legal standards such as Section 508 of the (United States) Rehabilitation Act, WCAG 2.0 seems to be “just more work”. However, this is not the case. While it takes greater effort to implement an accessible site, it's just the right thing to do to assure that anyone who wants to access a site can access the site and enjoy the full experience intend for that site's visitors.

The Accessibility Project (A11Y) is a community driven effort to help make it easier for developers to implement accessibility features. In response to the question, “Why is accessibility important?”, they state:

Blind and visually impaired make up 285,000,000 people according to the World Health Organization (June 2012) with 39,000,000 categorized as legally blind and the remaining 246,000,000 visually impaired. Deaf and hearing impaired make up 275,000,000 (2004) in the moderate-to-profound hearing impairment category.

To put these in perspective, the population of the United States of America is 315,000,000 (January 2013)

Accessibility is so important that the UN Convention on the Rights of Persons with Disabilities (2006) recognizes Web accessibility as a basic human right.

Accessibility and SEO

Accessibility as a goal is the result of doing many things right. Doing things right is extremely important to Google and impacts your SERP ranking. To mention just how important this is to SEO, Google Accessibility Engineer Loretta Guarino Reid serves as Co-Chair on the WCAG Working Group and is one of the editors of the Web Content Accessibility Guidelines (WCAG) 2.0, and Google maintains an entire site dedicated to their accessibility initiatives, which extend far beyond the World Wide Web.

As far we know, Genesis Version 2.2 is the first professional web development framework to include accessibility capabilities for headings, drop down menus, skip links, rems, and the WordPress search form. Kudos to the Studio Press development team for doing things right and accomplishing this monumental achievement.