Support » Plugin: WP REST Yoast Meta » SEO Title Meta follow-up

  • Resolved jamiewarb


    Hey Richard,

    First off, thanks very much for your teams work on this plugin. It works great, and has made what used to be a bit of a problem for us using the REST API into something very simple and easy.

    I’m coming across the same problem as Cris in this ticket (
    Unfortunately I think that original Yoast does something different to your plugin. Please see below for details.

    Yoast has a section for each post called “SEO Title”. When filled out, this will go into the <title></title> tag, and also in og:title.

    However, if you then add a Facebook SEO title, og:title will be replaced by the facebook title, but the <title> tag will still use the SEO title that was defined.

    However, as this SEO title isn’t passed through, as Cris mentioned above, we can not get the same behaviour as the original Yoast plugin.

    Please see these two images for a clearer explanation:

    SEO Title but no FB Title:

    SEO Title and an FB Title:

    Please let me know if you’ll be adding in a title meta like Cris’ request, or if there’s another way to access this title in the same fashion the original Yoast plugin allows for.

    Many thanks,

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Richard Korthuis


    Hi @jamiewarb

    I have investigated this and Yoast alters the <title> using the wp_title filter. Using our plugin I do not want to alter anything from the default WP REST API, so we will be adding this title in a new yoast_title field next to the yoast_meta and yoast_json_ld. I will let you know once we have implemented and release this.

    Yes that sounds perfect. Thank you very much!

    Plugin Author Richard Korthuis


    Hi @jamiewarb

    We just released a new version of our plugin which includes the yoast_title. Please let us know if this works for you.

    Hey, Richard, nice work. Thank you for your plugin. After your recent change, I am getting an undefined index: title on $yoast_data['title'] (class-frontend.php@122). I think it is related to cache, but I don’t have any kind of cache currently. Do you have any suggestions? Thanks!

    Hi again. I think I found in the code where there is the cache.

    At line 223 I updated this:

    if ( false === $yoast_data || ! isset( $yoast_data['meta'] ) || ! isset( $yoast_data['json_ld'] ) ) {

    to this:

    if ( false === $yoast_data || ! isset( $yoast_data['title'] ) || ! isset( $yoast_data['meta'] ) || ! isset( $yoast_data['json_ld'] ) ) {

    What do you think?

    • This reply was modified 1 month, 3 weeks ago by matheuspaiva.
    Plugin Author Richard Korthuis


    Hi @matheuspaiva

    You are absolutely right! As a matter of fact we already had the exact same fix ready for deployment. I will try to release this fix today.

    Great! I will be glad if you could drop a note here when the fix is released. Thanks again!

    Plugin Author Richard Korthuis


    Hi @matheuspaiva

    A little later than I said (sorry for that), we just released a new version of the plugin with this fix in it.

    Thanks for letting me know!

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.