Title: json ld data
Last modified: October 16, 2019

---

# json ld data

 *  Resolved [alexvandervegt](https://wordpress.org/support/users/alexvandervegt/)
 * (@alexvandervegt)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/json-ld-data/)
 * Is there a possibility this plugin will also output yoast json ld data in the
   future?

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [Richard Korthuis](https://wordpress.org/support/users/rockfire/)
 * (@rockfire)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/json-ld-data/#post-12034460)
 * Hi [@alexvandervegt](https://wordpress.org/support/users/alexvandervegt/)
 * To be honest I wasn’t aware Yoast had added the json ld data, so I am actually
   very happy with your question 🙂 So to answer your question: yes there is a possibility
   our plugin will also output the Yoast json ld data! I will see to it that we 
   will add it as soon as possible.
 *  Thread Starter [alexvandervegt](https://wordpress.org/support/users/alexvandervegt/)
 * (@alexvandervegt)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/json-ld-data/#post-12034579)
 * Thanks! Please give me a headsup when its done 😉
 *  Plugin Author [Richard Korthuis](https://wordpress.org/support/users/rockfire/)
 * (@rockfire)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/json-ld-data/#post-12038260)
 * Hi [@alexvandervegt](https://wordpress.org/support/users/alexvandervegt/)
 * We just released a new version of our plugin, which now includes the json ld 
   data. For each post/page/… you can find an array of JSON LD data in that object
   under `yoast_json_ld`.
 * Please let us know if this works for you!
 *  Thread Starter [alexvandervegt](https://wordpress.org/support/users/alexvandervegt/)
 * (@alexvandervegt)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/json-ld-data/#post-12041918)
 * This is perfect!
 * Since you are in fire, I have another question, I do not see the yoast meta and
   json ld appear for custom post types in the wp rest api?
 *  Plugin Author [Richard Korthuis](https://wordpress.org/support/users/rockfire/)
 * (@rockfire)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/json-ld-data/#post-12042862)
 * Hi [@alexvandervegt](https://wordpress.org/support/users/alexvandervegt/)
 * The plugin should add the yoast meta and json ld for custom post types automatically.
   Unless you have created a custom WP_REST_Controller for it and have not implemented
   the `rest_prepare_POSTTYPE` filter. I just did a test and did see them in a custom
   post type I just created.
    So if it isn’t working on your side, it is either 
   because you have a custom WP_REST_Controller which doesn’t implement the `rest_prepare_POSTTYPE`
   filter (replace `POSTTYPE` with your actual post type name) or there is some 
   caching which is serving cache from before you activated the WP REST Yoast Meta
   plugin. If it isn’t caused by any one of those, I am affraid I don’t know what
   might me causing it.
 * By the way: we also just released a new version of our plugin to fix an inconsistency
   in the way the json ld data is parsed. We prefer DOMDocument parsing, but if 
   that isn’t installed we try simplexml parsing instead. The two gave a different
   output of the json ld data, which we fixed. But depending on which is used on
   your server the output might have changed, so just a heads up 😉
 *  Plugin Author [Richard Korthuis](https://wordpress.org/support/users/rockfire/)
 * (@rockfire)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/json-ld-data/#post-12105980)
 * This thread has been marked as resolved due to lack of activity.
 * You’re always welcome to [open a new topic](https://wordpress.org/support/plugin/wp-rest-yoast-meta/#new-post).
 * Thanks for understanding!
 *  Thread Starter [alexvandervegt](https://wordpress.org/support/users/alexvandervegt/)
 * (@alexvandervegt)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/json-ld-data/#post-12110917)
 * I found the problem, your hook is excuted before mine.
 * When i adjust
 * add_action( ‘init’, [ $this, ‘register_rest_prepare_hooks’ ] );
 * to
 * add_action( ‘init’, [ $this, ‘register_rest_prepare_hooks’ ], 50 );
 * Everything works as expected. Is this something you can change?
 *  Plugin Author [Richard Korthuis](https://wordpress.org/support/users/rockfire/)
 * (@rockfire)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/json-ld-data/#post-12121200)
 * Hi [@alexvandervegt](https://wordpress.org/support/users/alexvandervegt/)
 * Is this really the `add_action` for which you changed the priority? All this 
   hook does is adding the `rest_prepare_POST_TYPE` filters. Are you sure you didn’t
   change the priority for the `rest_prepare_POST_TYPE` filters?
 * By the way couldn’t you also solve it by changing the priority of your own hook
   to a priority lower than 10?
 * We are willing to change the priority, but we first want to make sure we are 
   talking about the correct hook.
 *  Thread Starter [alexvandervegt](https://wordpress.org/support/users/alexvandervegt/)
 * (@alexvandervegt)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/json-ld-data/#post-12127392)
 * Yeah ofcourse, did not thought about that.
 * Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘json ld data’ is closed to new replies.

 * ![](https://ps.w.org/wp-rest-yoast-meta/assets/icon.svg?rev=2045273)
 * [WP REST Yoast Meta](https://wordpress.org/plugins/wp-rest-yoast-meta/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-rest-yoast-meta/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-rest-yoast-meta/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-rest-yoast-meta/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-rest-yoast-meta/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-rest-yoast-meta/reviews/)

 * 9 replies
 * 1 participant
 * Last reply from: [alexvandervegt](https://wordpress.org/support/users/alexvandervegt/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/json-ld-data/#post-12127392)
 * Status: resolved