WordPress.org

Ready to get started?Download WordPress

Forums

Putting Multiple Post Excerpts Into A Page (3 posts)

  1. zechmann
    Member
    Posted 2 years ago #

    I'd like to make a page where I can write a short article and then show around 10 excerpts from past posts. Is this possible?

    If you need anymore details, would love to answer them (obviously)

    Thanks!

  2. vjpo
    Member
    Posted 2 years ago #

    You can create special page template and use in this template, for example, the get_posts function. Something like this...

    $args = array( 'numberposts' => 10 );
    $postslist = get_posts( $args );
    foreach ($postslist as $post) :  setup_postdata($post); ?>
    	<div>
    		<?php the_title(); ?><br />
    		<?php the_excerpt(); ?>
    	</div>
    <?php endforeach; ?>
  3. vjpo
    Member
    Posted 2 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags