WordPress.org

Forums

WordPress SEO by Yoast
Get meta-description with limited characters (1 post)

  1. nomeiofio
    Member
    Posted 1 year ago #

    Hi!

    I need show in homepage the meta-description of three pages. I got it partially with:

    <?php
    $yoast_meta = get_post_meta($post->ID, '_yoast_wpseo_metadesc', true);
    if ($yoast_meta) {
    echo '<p>'.$yoast_meta.'</p>';
    }
    ?>

    I need to limit the number of characters, because I need to ensure that the texts have exactly the same size.

    Is it possible?

    Thanks,

    Danilo

    https://wordpress.org/plugins/wordpress-seo/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress SEO by Yoast
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.