Title: WP REST Yoast Meta
Author: Acato
Published: <strong>2019年3月6日</strong>
Last modified: 2025年1月23日

---

プラグインを検索

![](https://ps.w.org/wp-rest-yoast-meta/assets/banner-772x250.png?rev=2045273)

このプラグインは **WordPress の最新3回のメジャーリリースに対してテストされていま
せん**。もうメンテナンスやサポートがされていないかもしれず、最新バージョンの WordPress
で使用した場合は互換性の問題が発生する可能性があります。

![](https://ps.w.org/wp-rest-yoast-meta/assets/icon.svg?rev=2045273)

# WP REST Yoast Meta

 作者: [Acato](https://profiles.wordpress.org/acato/)

[ダウンロード](https://downloads.wordpress.org/plugin/wp-rest-yoast-meta.2025.1.0.zip)

 * [詳細](https://ja.wordpress.org/plugins/wp-rest-yoast-meta/#description)
 * [レビュー](https://ja.wordpress.org/plugins/wp-rest-yoast-meta/#reviews)
 * [開発](https://ja.wordpress.org/plugins/wp-rest-yoast-meta/#developers)

 [サポート](https://wordpress.org/support/plugin/wp-rest-yoast-meta/)

## 説明

_This plugin is no longer updated, but is open for adoption_
 As of Yoast SEO version
16.7 the functionality provided by this plugin is now [part of the Yoast SEO plugin](https://developer.yoast.com/customization/apis/rest-api/)
itself. This plugin will no longer be updated, but is open for adoption. If you 
are interested in adopting this plugin, please contact the authors.

Are you using WordPress for a headless set-up, using the WP REST API? And would 
you like to use the Yoast SEO plugin just like you would for any other project? 
This plugin adds the meta tags generated by the Yoast SEO plugin to the WP REST 
API output, allowing your headless set-up to implement them. Also when you are using
Yoast SEO Premium you have the option to retrieve redirects throught the API: this
plugin adds a custom endpoint (`/wp-rest-yoast-meta/v1/redirects`) to provide those
redirects in a JSON format. Since Yoast 11.0 JSON LD Schema.org data is also supported
and is now also available through the WP REST API when using this plugin.

### Installation from within WordPress

 1. Visit ‘Plugins > Add New’ (or ‘My Sites > Network Admin > Plugins > Add New’ if
    you are on a multisite installation).
 2. Search for ‘WP REST Yoast Meta’.
 3. Activate the WP REST Yoast Meta plugin through the ‘Plugins’ menu in WordPress.

### Installation manually

 1. Upload the `wp-rest-yoast-meta` folder to the `/wp-content/plugins/` directory.
 2. Activate the WP REST Yoast Meta plugin through the ‘Plugins’ menu in WordPress.

## スクリーンショット

[⌊The WP REST API output for the Hello World post example.⌉⌊The WP REST API output
for the Hello World post example.⌉[

The WP REST API output for the Hello World post example.

## FAQ

### I have installed the plugin, where can I find the Yoast meta tags?

For each post/page/… you can find an array of meta tags in that object under `yoast_meta`.

### I have installed the plugin, where can I find the Yoast JSON LD Schema.org data?

For each post/page/… you can find an array of JSON LD data in that object under `
yoast_json_ld`.

### I have created a custom post type, will the plugin add the meta tags to that post type?

Yes, the plugin will automatically add meta tags to custom post types. Unless you
have created a custom WP_REST_Controller for it and have not implemented the `rest_prepare_POSTTYPE`
filter.

### Can I add my own meta tags?

Yes you can! Use the hook `wp_rest_yoast_meta/filter_yoast_meta` like this:

    ```
    /**
     * Add a custom meta tag.
     */
    function wpym_add_custom_meta_tag( $yoast_meta ) {
        $yoast_meta[] = array(
            'property' => 'og:type',
            'content' => 'article'
        );
        return $yoast_meta;
    }
    add_filter( 'wp_rest_yoast_meta/filter_yoast_meta', 'wpym_add_custom_meta_tag', 10, 1);
    ```

### I have the Yoast SEO Premium plugin installed, will it work?

Yes this plugin supports both the free and the premium version of Yoast SEO. Please
keep in mind that the free version of Yoast SEO does not allow you to specify redirects,
so the redirects endpoint will return an empty set.

### I have set the homepage to display my latest posts, how do I get the Yoast meta for the homepage?

This plugin adds a custom endpoint (`/wp-rest-yoast-meta/v1/home`) to retrieve the
Yoast meta for the homepage.

### I don’t want the Yoast Meta to be applied to post type X, can I stop it from being added?

Yes you can! Use the hook `wp_rest_yoast_meta/filter_post_types` like this:

    ```
    /**
     * Remove Yoast Meta from the page post type
     */
    function wpym_remove_post_type( $post_types ) {
        foreach ( $post_types as $key => $post_type ) {
            if ( 'page' === $post_type->name ) {
                unset( $post_types[ $key ] );
            }
        }

        return $post_types;
    }

    add_filter( 'wp_rest_yoast_meta/filter_post_types', 'wpym_remove_post_type', 10, 1 );
    ```

## 評価

![](https://secure.gravatar.com/avatar/f62efe6874f8cae1d63545394bf7b9ced93e83905f0d4b086c96188f557b56b2?
s=60&d=retro&r=g)

### 󠀁[This plugin is what I’m looking for!](https://wordpress.org/support/topic/this-plugin-is-what-im-looking-for/)󠁿

 [AnnemarieH](https://profiles.wordpress.org/annemarieh/) 2020年9月11日

Thank you! This plugin helped me to get all the Yoast meta data in JSON format, 
so I can use it in my website build with React in combination with Headless Wordpress.

![](https://secure.gravatar.com/avatar/9f944958c9f53e191d91cb6af487baf2900dd621d9b00a8705c8a718f3fadd4f?
s=60&d=retro&r=g)

### 󠀁[No problems](https://wordpress.org/support/topic/no-problems-68/)󠁿

 [mantasdaraciunas](https://profiles.wordpress.org/mantasdaraciunas/) 2020年4月18
日

Returns everything needed from the first time

![](https://secure.gravatar.com/avatar/83a604c66643efc8f4d810b5f2f7f19db6a3aac5f587f7b76e35fd6ba1f27b0f?
s=60&d=retro&r=g)

### 󠀁[Works As Expected!](https://wordpress.org/support/topic/works-as-expected-505/)󠁿

 [mread1208](https://profiles.wordpress.org/mread1208/) 2019年12月31日

Install, activate, and boom… instantly started seeing all of the SEO by Yoast fields
in my JSON responses.

![](https://secure.gravatar.com/avatar/c5b814900f0a849c56621aacb85b2e05d8f79d5d494eccd05155350b88e22d73?
s=60&d=retro&r=g)

### 󠀁[Headless WordPress](https://wordpress.org/support/topic/headless-wordpress/)󠁿

 [Cris](https://profiles.wordpress.org/ctagupa/) 2019年10月31日

Must Have for applications using WordPress as headless CMS. Much better to make 
use of the existing Yoast SEO settings. Thanks for this plugin for making it available
on the REST API.

![](https://secure.gravatar.com/avatar/c70d7c1ea2b886428ecd4299446b65ccd86c897ea82e6f87e5ba305cc1d745f9?
s=60&d=retro&r=g)

### 󠀁[Must have for Single Page Applications](https://wordpress.org/support/topic/must-have-for-single-page-applications/)󠁿

 [Rory Michael Heaney](https://profiles.wordpress.org/rorymheaney/) 2019年10月11
日

This is an awesome plugin and is a must-have for a headless setup.

![](https://secure.gravatar.com/avatar/fb3537255d51afd59b712526cf883f3f0e9f6ecfff9677ade3e98417eb612f06?
s=60&d=retro&r=g)

### 󠀁[Deserves more stars](https://wordpress.org/support/topic/deserves-more-stars-2/)󠁿

 [lordwill000](https://profiles.wordpress.org/lordwill000/) 2019年6月17日

Best plugin for headless WP with Yoast

 [ 6件のレビューをすべて表示 ](https://wordpress.org/support/plugin/wp-rest-yoast-meta/reviews/)

## 貢献者と開発者

WP REST Yoast Meta はオープンソースソフトウェアです。以下の人々がこのプラグインに
貢献しています。

貢献者

 *   [ Acato ](https://profiles.wordpress.org/acato/)
 *   [ Richard Korthuis ](https://profiles.wordpress.org/rockfire/)

“WP REST Yoast Meta” は2ロケールに翻訳されています。 [翻訳者](https://translate.wordpress.org/projects/wp-plugins/wp-rest-yoast-meta/contributors)
のみなさん、翻訳へのご協力ありがとうございます。

[“WP REST Yoast Meta” をあなたの言語に翻訳しましょう。](https://translate.wordpress.org/projects/wp-plugins/wp-rest-yoast-meta)

### 開発に興味がありますか ?

[コードを閲覧](https://plugins.trac.wordpress.org/browser/wp-rest-yoast-meta/)する
か、[SVN リポジトリ](https://plugins.svn.wordpress.org/wp-rest-yoast-meta/)をチェック
するか、[開発ログ](https://plugins.trac.wordpress.org/log/wp-rest-yoast-meta/)を
[RSS](https://plugins.trac.wordpress.org/log/wp-rest-yoast-meta/?limit=100&mode=stop_on_copy&format=rss)
で購読してみてください。

## 変更履歴

#### 2021.1.2

Release Date: July 1st, 2021

Bugfix: The yoast_title wasn’t set correctly for consecutive posts in an overview
request.

#### 2021.1.1

Release Date: April 20th, 2021

Bugfix: As of WordPress 5.7.0 the robots meta doesn’t come from Yoast SEO, but from
WP Core.
 Bugfix: The yoast meta doesn’t include the tag anymore, retrieve it differently.

#### 2021.1.0

Release Date: January 7th, 2021

Bugfix: Do not call deprecated wpseo_frontend_head_init function.

#### 2020.2.2

Release Date: September 7th, 2020

Bugfix: permission_callback notice as of WordPress 5.5.

#### 2020.2.1

Release Date: June 8th, 2020

Bugfix: Minor fix to the redirects endpoint.

#### 2020.2.0

Release Date: April 30th, 2020

Bugfix: Added support for Yaost SEO 14.0, which has done an extensive rebuild of
code.

#### 2020.1.0

Release Date: January 16th, 2020

Bugfix: Fix for custom post types that are registered later in the initialisation
process.

#### 2019.5.3

Release Date: December 12th, 2019

Bugfix: Fix notice.
 Bugfix: Proper escaping of special characters.

#### 2019.5.2

Release Date: November 22nd, 2019

Bugfix: Check for at least Yoast SEO 11.* for specific functionality.
 Feature: 
Added seperate yoast_title attribute.

#### 2019.5.1

Release Date: November 7th, 2019

Feature: Added filter to be able to remove yoast meta from post types.
 Bugfix: 
Fix multiplication of json-ld data. Bugfix: Make sure Twitter meta image displays
correct image. Bugfix: Fix homepage endpoint not updating.

#### 2019.5.0

Release Date: October 29th, 2019

Feature: Added custom endpoint for retrieving homepage Yoast meta.

#### 2019.4.2

Release Date: October 20th, 2019

Bugfix: Transients shouldn’t be set without expiration.

#### 2019.4.1

Release Date: October 18th, 2019

Bugfix: fix inconsistency between DOMDocument and simplexml in parsing json ld data.

#### 2019.4.0

Release Date: October 17th, 2019

Feature: Added Yoast SEO’s JSON LD Schema.org data to the WP REST API.

#### 2019.3.0

Release Date: October 15th, 2019

Bugfix: Improved HTML parsing using DOMDocument.

#### 2019.2.1

Release Date: June 27th, 2019

Bugfix: Yoast meta wasn’t regenerated correctly after a post update.

#### 2019.2.0

Release Date: June 16th, 2019

Improvement: Meet WordPress Coding Standards.
 Bugfix: Better check if Yoast SEO(
Premium) is installed and activated.

#### 2019.1.0

Release Date: March 6th, 2019

First public version.

## このプラグインの後継者を募集しています

 このプラグインは、開発を引き継いでくれる新たな開発者を募集しています。

 [続きを読む](https://developer.wordpress.org/plugins/wordpress-org/take-over-an-existing-plugin/)

## メタ

 *  バージョン **2025.1.0**
 *  最終更新日 **2年前**
 *  有効インストール数 **1,000+**
 *  WordPress バージョン ** 4.7またはそれ以降 **
 *  検証済み最新バージョン: **5.7.21**
 *  PHP バージョン ** 5.4またはそれ以降 **
 *  言語
 * [Dutch](https://nl.wordpress.org/plugins/wp-rest-yoast-meta/)、[English (US)](https://wordpress.org/plugins/wp-rest-yoast-meta/)、
   [French (France)](https://fr.wordpress.org/plugins/wp-rest-yoast-meta/).
 *  [プラグインを翻訳](https://translate.wordpress.org/projects/wp-plugins/wp-rest-yoast-meta)
 * タグ
 * [adopt-me](https://ja.wordpress.org/plugins/tags/adopt-me/)[api](https://ja.wordpress.org/plugins/tags/api/)
   [WP-REST](https://ja.wordpress.org/plugins/tags/wp-rest/)[wp-rest-api](https://ja.wordpress.org/plugins/tags/wp-rest-api/)
   [Yoast](https://ja.wordpress.org/plugins/tags/yoast/)
 *  [詳細を表示](https://ja.wordpress.org/plugins/wp-rest-yoast-meta/advanced/)

## 評価

 5つ星中5つ星

 *  [  6 5-星レビュー     ](https://wordpress.org/support/plugin/wp-rest-yoast-meta/reviews/?filter=5)
 *  [  0 4-星レビュー     ](https://wordpress.org/support/plugin/wp-rest-yoast-meta/reviews/?filter=4)
 *  [  0 3-星レビュー     ](https://wordpress.org/support/plugin/wp-rest-yoast-meta/reviews/?filter=3)
 *  [  0 2-星レビュー     ](https://wordpress.org/support/plugin/wp-rest-yoast-meta/reviews/?filter=2)
 *  [  0 1-星レビュー     ](https://wordpress.org/support/plugin/wp-rest-yoast-meta/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/wp-rest-yoast-meta/reviews/#new-post)

[すべてのレビューを見る](https://wordpress.org/support/plugin/wp-rest-yoast-meta/reviews/)

## 貢献者

 *   [ Acato ](https://profiles.wordpress.org/acato/)
 *   [ Richard Korthuis ](https://profiles.wordpress.org/rockfire/)

## サポート

意見や質問がありますか ?

 [サポートフォーラムを表示](https://wordpress.org/support/plugin/wp-rest-yoast-meta/)