Query all posts
-
How do I query all posts rather than just by a specific category or tag? etc.
Basically I have a page that uses a custom template. On it I would like to pull in all of the posts for a site. If I use the standard:
<?php if(have_posts()) : ?> <?php while(have_posts()) : the_post(); ?> <h2><?php the_title(); ?></h2> <?php the_excerpt(); ?> <?php endwhile; ?> <?php endif; ?>
Then it just gets the content for that particular page.
Is there some way I can use the query_posts function to do this?
Thanks.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Query all posts’ is closed to new replies.