612-293-8629 [email protected]

Today I wanted to create a page on my website to display the 20 most recent posts.  If this was the home page of the website, it would be no problem since WordPress does that by default.  But this new page was an interior page.

The fix was simple.  I used query_posts to grab all published posts like so:

<?php query_posts ('post_status=publish'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

Pretty nifty!

What are some other ways to do this?


We love to communicate: phone, email, text, Facebook, Twitter, LinkedIn, you name it.



Call Now

Enroll in Our Free Beginner WordPress Class by Email

Never feel powerless in WordPress again!  Become a WordPress superstar for free in only minutes a day!

Our Beginner WordPress Email Class is delivered to your inbox!

Learn More 

You Have Successfully Enrolled! Prepare For Amazing!