have_posts getting pages instead of posts
-
Since the 3.0 update, it appears my
have_posts
loop is returning my pages instead of my posts. The following code:<?php get_sidebar(); ?> <?php if (have_posts()) : ?> <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts('paged=' .$paged); global $more; $more = 0; ?> <?php while (have_posts()) : the_post(); ?> <div class="post"> <h1><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1> <div class="meta">by <?php echo the_author_link(); ?>, <?php the_time(); ?> on <?php echo the_date(); ?> | <a href="<?php comments_link(); ?>"><?php comments_number('0 Comments','1 Comment','% Comments'); ?></a></div> <?php the_content('Read the rest of this entry »'); ?> <div class="meta meta-bottom"><a href="<?php comments_link(); ?>"><?php comments_number('0 Comments','1 Comment','% Comments'); ?></a> | Categories: <?php the_category(' '); ?><a href="https://twitter.com/home?status=Currently%20reading:%20<?php echo the_permalink(); ?>"><img src="<?php bloginfo('template_url'); ?>/images/retweet.png" alt="retweet this" class="retweet-post" /></a></div> </div><!-- end .post --> <?php endwhile; else: ?> <?php endif; ?> <div class="pagination"> <?php function show_posts_nav() { global $wp_query; return ($wp_query->max_num_pages > 1); } ?> <?php if (show_posts_nav()) : ?> <div class='navigation'> <span class='older'><?php next_posts_link('« Older Entries'); ?></span> <span class='newer'><?php previous_posts_link('Newer Entries »'); ?></span> </div> <?php endif; ?> </div><!-- end .pagination -->
Returns a blank entry with the title of my first page, Home. Should I add text to the home page, it shows within the template.
Any idea where I’m going wrong here? Live site is at https://qworky.com/blog
Permalinks to posts work, see: https://www.qworky.com/blog/2010/05/qworky-review-viral-loop/
Thanks so much for any help.
- The topic ‘have_posts getting pages instead of posts’ is closed to new replies.