I have a loop that displays the post title and excerpt. If I want to show the last 20 posts, how and where do I add this? I read i should use:
<?php wp_get_recent_posts( $num ) ?>
But my loop does not have that variable. My loop looks like this:
<?php while ( have_posts() ) : the_post() ?>
<div id="post-<?php the_ID() ?>" class="<?php sandbox_post_class() ?>">
<h3 class="entry-title" style="margin-top:0px; padding-top:0px">
<a href="<?php the_permalink() ?>" title="<?php printf( __('Permalink to %s', 'sandbox'), the_title_attribute('echo=0') ) ?>" rel="bookmark"><?php the_title() ?></a></h3>
<?php
$myExcerpt = get_the_excerpt();
if ($myExcerpt != '') {
// Some string manipulation performed
}
echo $myExcerpt; // Outputs the processed value to the page
?>
</div>
Really appreciate any advice!