954,597 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Wordpress get recent posts

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

jrock2004
Light Poster
35 posts since Jul 2010
Reputation Points: 10
Solved Threads: 2
 

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.

Kraai
Senior Poster
3,981 posts since Feb 2008
Reputation Points: 76
Solved Threads: 87
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: