No description
This repository has been archived on 2026-08-22. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jan Henning Thorsen 204c552ed4 Changed name
2019-03-23 21:46:21 +08:00
plugin.php Changed name 2019-03-23 21:46:21 +08:00
README.md Changed name 2019-03-23 21:46:21 +08:00
readme.txt Forgot to update README.md 2019-03-23 21:44:18 +08:00

Yoast API meta data

  • Contributors: Jan Henning Thorsen
  • Tags: yoast, wp-api, rest, seo
  • Requires at least: 5.0
  • Tested up to: 5.1
  • Stable tag: trunk
  • License: GPLv2 or later
  • License URI: http://www.gnu.org/licenses/gpl-2.0.html

Adds Yoast fields to WP REST API responses

Description

Adds Yoast fields to WP REST API responses under the "yoast" key.

Note that it only adds the fields I care about.

Example:

{
  "id": "..."
  ...
  "yoast": {
    "canonical"             => "...",
    "meta_robots_nofollow"  => "...",
    "meta_robots_noindex"   => "...",
    "metadesc"              => "...",
    "opengraph_description" => "...",
    "opengraph_image"       => "...",
    "opengraph_image_id"    => "...",
    "opengraph_title"       => "...",
    "primary_category"      => "...",
    "redirect"              => "...",
    "score"                 => "...",
    "title"                 => "...",
    "twitter_description"   => "...",
    "twitter_image"         => "...",
    "twitter_image_id"      => "...",
    "twitter_title"         => "...",
  }
}

Installation

Download the plugin from https://github.com/jhthorsen/wp-api-yoast-meta/archive/master.zip and upload it to your wordpress.

Activate the plugin through the 'Plugins' screen in WordPress