• Resolved tsahil

    (@tsahil)


    Hi,

    It would be great if I could get through php functions of this plugin the description or title that I provided to it.
    I would like to use it as a short intro/excerpt to the posts somewhere else on my blog.
    Is that possible at all?

    Thanks,
    Tsahi

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor joostdevalk

    (@joostdevalk)

    Yeah it is, check in frontend/class-frontend.php ??

    Thread Starter tsahil

    (@tsahil)

    What I found was wpseo_metadesc() which looked promising, but when I try to build my homepage out of a few posts that show it as the excerpt, it gives nothing back.
    The internal if/else statements there just fall down through all of them, leaving the value empty.

    Plugin Contributor joostdevalk

    (@joostdevalk)

    it’s stored in a post meta value, _wpseo_metadesc I think, you could just grab that?

    Thread Starter tsahil

    (@tsahil)

    Closest thing I found was _yoast_wpseo_metadesc, but I have no clue how to access it in php (I am an engineer, but not that good with php).

    Thread Starter tsahil

    (@tsahil)

    Ok, in the end of the day, this is what worked for me:

    echo get_post_meta(get_the_ID(), '_yoast_wpseo_metadesc', true);

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: WordPress SEO] Getting title/description for other purpose’ is closed to new replies.