WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
Returning the Meta Description (3 posts)

  1. Dillx
    Member
    Posted 1 year ago #

    Version 0.2.3 says
    Meta Description can now be returned, using $wpseo_front->metadesc( false ); for use elsewhere.

    Do you have a recommended method / example of using this ?

    http://wordpress.org/extend/plugins/wordpress-seo/

  2. Dillx
    Member
    Posted 1 year ago #

    Have tried this which I found in some other threads but it produces nothing.

    $wpseo = new WPSEO_Frontend();
    echo $wpseo->metadesc( false );

    and this

    echo $wpseo_front->metadesc( false );
    produces an error
    Fatal error: Call to a member function metadesc() on a non-object

  3. Dillx
    Member
    Posted 1 year ago #

    Well I found this in another post
    (http://wordpress.org/support/topic/add-page-number-to-meta-description-in-wordpress-seo-by-yoast)
    and this seems to work.

    $metadesc = wpseo_get_value('metadesc');

    Be interested to know what the official usage should be.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic