• Resolved batcoderstech

    (@batcoderstech)


    Hi, I am trying to get the following values but it does not return any result –

    It works fine with other meta keys but not with the yoast keys.

    echo get_post_meta(get_the_ID(), ‘_yoast_wpseo_metadesc’, true);
    echo get_post_meta(get_the_ID(), ‘_yoast_wpseo_title’, true);

    I have tried it with $post->id and directly adding the post number aswell but still no result. Can you suggest something to fix it ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thanks so much for reaching out about this. We are sorry to hear that you’re having trouble. We totally understand how that could be frustrating for you! Let’s get down to the bottom of what’s going on here.

    Did you try using the new Surfaces API? If not, we highly recommend you do so. You can find more information about this here.

    Thread Starter batcoderstech

    (@batcoderstech)

    That works. Thanks a lot 🙂

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

The topic ‘Meta Keys not working’ is closed to new replies.