Support » Plugin: Yoast SEO » wpseo_get_value

  • Resolved Dillx

    (@dillx)


    This function seems to have been removed recently. Is there a replacement function ?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Md Mazedul Islam Khan

    (@mazedulislamkhan)

    Unfortunately, we are unable to confirm whether the wpseo_get_value has been removed or not. We recommend you to take a look at our codebase here to find the most suitable function you’re looking for.

    I had the same issue.

    Instead, you’ll need to pull the custom post meta values like this:

    $string = WPSEO_Meta::get_value( $key, $postid );

    widecast… thank you very much! I used the wpseo_get_value in conjunction with an affiliate link, and losing it made me crazy! check out http://www.ok2BeGreen.com and look at the search box for Amazon…

    http://www.3Deers.com

    Thread Starter Dillx

    (@dillx)

    Thanks Widecast. I’ve tried this but I must have some of the settings wrong. Its doesn’t fail but it doesn’t show any descriptions either. does $key need to be a specific value ?

    Yes, the $key needs to be set with the value that you are trying to retrieve.

    Let’s say your original function was:

    wpseo_get_value('metadesc');

    Try replacing it with:

    WPSEO_Meta::get_value('metadesc');

    • This reply was modified 4 years, 7 months ago by widecast.
    • This reply was modified 4 years, 7 months ago by widecast.
    Thread Starter Dillx

    (@dillx)

    Perfect ! Thank you

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘wpseo_get_value’ is closed to new replies.