Homepage
Link to WPGraphQL on Github
Link to WPGraphQL on WordPress.org

WPGraphQL Google Schema

This FREE plugin from @izzygld261 adds Google Schema support to WPGraphQL

Community Plugin

View Plugin on Github
Plugin README

wp-graphql-google-schema

Google Search works hard to understand the content of a page. You can help us by providing explicit clues about the meaning of a page to Google by including structured data on the page. Structured data is a standardized format for providing information about a page and classifying the page content; for example, on a recipe page, what are the ingredients, the cooking time and temperature, the calories, and so on.

Google uses structured data that it finds on the web to understand the content of the page, as well as to gather information about the web and the world in general.

As recommended by google - Article

Pre-req's

Using this schema requires having the WPGraphQL plugin installed and activated. (version 0.0.15 or newer)

Structure

  • [Meta.php] - Regsitering and hooking up the Yoast SEO

  • [article.vue] - Here's an example of JSON-LD code for an Article object.

  • [audio.vue] - Here's an example of JSON-LD code for an Post format Audio object.

  • [video.vue] - Here's an example of JSON-LD code for an Post format Audio object.

  • [postQuery.ggl] - graphql query to reproduce the sample data.

  • [exampleData] - data example.

Todos

  • Add more schema fields

  • Add Date fields

  • Add Language fields

  • Add, Video, Audio, Recipes Schemas.

Free Software, Hell Yeah!

Article Google Preview

Upcoming Releases

Using Google Tag Manager to Dynamically Generate Schema/JSON-LD Tags (Learn more)

Use Google Tag Manager to insert the code with the "Custom HTML" tag. (See screenshot below.) Why Tag Manager? Because Tag Manager can dynamically change the Structured Data based on the content of the page! (eg: Blog posts) See this article and this older Moz article for more information on how to do that.

UPDATE: Google changed something. Now, in order to have the Structured Data Testing tool detect inserted Structured Data properly, it must be inserted programatically. Pasting your desired Structured Data within this snippet below will allow it to be detected properly by the testing tool.

See also: