For use with the new WP REST API
Returns Yoast post or page metadata in a normal post or page request. Stores the metadata in the yoast_meta field of the returned data.
{
id: 123,
...
yoast_meta: {
yoast_wpseo_title: "Testy Test | My WordPress site",
yoast_wpseo_metadesc: "My description",
yoast_wpseo_canonical: "http://my-wordpress-site.test/testy-test"
}
}
Supports pages, posts, categories, tags and any public custom post types
Currently fetching:
yoast_wpseo_titleyoast_wpseo_metadescyoast_wpseo_canonical
Currently updating:
yoast_wpseo_focuskwyoast_wpseo_titleyoast_wpseo_metadescyoast_wpseo_linkdexyoast_wpseo_metakeywordsyoast_wpseo_meta-robots-noindexyoast_wpseo_meta-robots-nofollowyoast_wpseo_meta-robots-advyoast_wpseo_canonicalyoast_wpseo_redirectyoast_wpseo_opengraph-titleyoast_wpseo_opengraph-descriptionyoast_wpseo_opengraph-imageyoast_wpseo_twitter-titleyoast_wpseo_twitter-descriptionyoast_wpseo_twitter-image
Thanks to Pablo Postigo, Tedy Warsitha and Charlie Francis for amazing contributions!
