• I am using the following code

    <?php
        $recent_posts = wp_get_recent_posts(4);
        foreach($recent_posts as $post){
            echo '
    <li><a>'.$post["post_title"].'</a></li>
    ';
        }
    ?>

    I got this code off of a website. Can someone tell me how to get the excerpt from this. The wordpress excerpt that defaults to like 55 words or something.

    Or any other Ideas about how to get an excerpt of the last 4 posts.

    Thanks again

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘How to get excerpt’ is closed to new replies.