• Resolved southcast

    (@southcast)


    I have set the post description to be automatically generated with this plugin using basic and advanced variables. I would like to display the automatically generated description in the actual post in frontend. I tried the method given here which has a code like below :

    <?php
     echo get_post_meta($post->ID, '_yoast_wpseo_metadesc', true);
     ?>

    But I am not getting anything printed in my frontend. What am I missing ?

    https://www.ads-software.com/plugins/wordpress-seo/

Viewing 1 replies (of 1 total)
  • Thread Starter southcast

    (@southcast)

    I should have researched a bit more. Here it is if someone else would like to do the same. All credits to this post on wpse.

    <?php $object = new WPSEO_Frontend();
           echo $object->metadesc( false ); ?>
Viewing 1 replies (of 1 total)
  • The topic ‘Display automatically generated description in the frontend’ is closed to new replies.