Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

YOAST SEO plugin data into WP REST API json

Tags:

wordpress

Has anyone succeeded printing Yoast SEO plugin data into WP REST API json? I was able to grab the primary category, but I have yet to find out how to grab SEO title and meta description.

like image 456
Yearim Kaya Kim Avatar asked Dec 06 '25 08:12

Yearim Kaya Kim


1 Answers

Found this nice plugin: https://github.com/ChazUK/wp-api-yoast-seo

For updating the values you can try adding a callback to "update_callback" in the "register_rest_field" function as in the doc example:

https://developer.wordpress.org/rest-api/extending-the-rest-api/modifying-responses/

like image 65
Pabamato Avatar answered Dec 08 '25 22:12

Pabamato



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!