WPGraphQL for Yoast SEO
This FREE plugin from @Ash_Hitchcock exposes data managed by Yoast SEO to the WPGraphQL Schema, allowing for your SEO data to be used in your headless applications.
Community PluginView Plugin on Github
If you are stuck on version of Yoast before V14 then use v3 of this plugin.
This is an extension to the WPGraphQL plugin (https://github.com/wp-graphql/wp-graphql) that returns Yoast SEO data.
Using this plugin? I would love to see what you make with it. 😃 @ash_hitchcock
Currently returning SEO data for:
- Custom post types
- Products (WooCommerce)
- Custom taxonomies
- WooCommerce Products
- Yoast Configuration
- Webmaster verification
- Social profiles
If there is any Yoast data that is not currently returned, please raise an issue so we can add it to the roadmap.
- Install from the WordPress Plugin Directory
- Clone or download the zip of this repository into your WordPress plugin directory & activate the WP GraphQL Yoast SEO plugin
- Install & activate WPGraphQL
Plugin now requires at least Yoast 14.0.0
Image urls are now returned as
This applies to
To query for the Yoast Data simply add the seo object to your query:
This can be used in production, however it is still under active development, breaking changes will only be introduced with major version releases.
Please Note: Yoast and WPGraphQL and their logos are copyright to their respective owners.