Loop only displaying one post when there should be two.
-
Hi there.
I’m having trouble with a loop which has been on a blog of mine for a while. The loop has been working perfectly and now for no apparent reason, one of the posts has stopped displaying in this loop (there should be 2 altogether).
I have done all the obvious things like making sure it’s actually published etc, adding a new post etc but have not managed to find the issue. I have also upgraded the WordPress system to the latest one and still cannot find the problem. The page exists when you go to the direct address, but does not display the posts on the following loop on a static page. Is there something in the following loop which has been ‘discontinued’ or something?
<?php query_posts('showposts=5&category_name=Events&meta_key=Date&meta_compare=>=&meta_value=' . $todaysDate . '&orderby=meta_value&order=ASC'); ?> <ul class="events_content"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <li> <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3> <p><?php global $more; $more = 0; ?></p> <p><?php the_content('More information »'); ?></p> <p><?php $Date = get_post_meta($post->ID, 'Date', true);?><?php echo $Date;?></p> </li> <?php endwhile; else: ?> <li>Sorry, no upcoming events!</li> <?php endif; ?> </ul> <?php wp_reset_query(); ?>
- The topic ‘Loop only displaying one post when there should be two.’ is closed to new replies.