Of so if I use this in a template on the index page I get what I want. If this code lives on a page.php page it shows me the recent pages created.

<?php $i = 1; while (have_posts() && $i < 6) : the_post(); ?>
      <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php $i++; endwhile; ?>

So what I want is on a page to display the recent blog posts and not the recent pages. What am I missing? Thanks

I am a bit confused in what you are asking. Do you want to display your blog-posts on the front page of wordpress? If so, look on the dashboard, there is a setting where you can choose what to display on the front page, blog-posts or pages.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.