WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. nomeiofio
    Member
    Posted 4 months 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/

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.