• I do a weekly “This week in news” and every time I have to copy/paste each title and link into a blog post.

    Does anyone know how to show the last X number of post titles with links in a blog post?

    I found this in the codex, but it just ouputs the PHP code:

    <?php
     $postslist = get_posts('numberposts=10&order=ASC&orderby=post_title');
     foreach ($postslist as $post) :
        setup_postdata($post);
     ?>
     <div>
     <?php the_date(); ?>
     <br />
     <?php the_title(); ?>
     <?php the_excerpt(); ?>
     </div>
     <?php endforeach; ?>

    Thanks a lot
    shane

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Show last X Post Titles in Blog Post?’ is closed to new replies.