Wordpress Recents Posts


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php query_posts('showposts=5'); ?>
  2. <ul>
  3. <?php while (have_posts()) : the_post(); ?>
  4. <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
  5. <?php endwhile;?>
  6. </ul>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.