Mini-loop won’t rewind since 2.8 upgrade
-
On the site I run, we list upcoming events in our sidebar, using a mini-loop.
Since upgrading to 2.8.x, it seems that the mini loop won’t rewind, so the last listed event’s
the_title
overwrites whatever page or post you’re looking at (amongst other items on the page).Either something is broken with WordPress, or the way I’m calling these items.
Here’s the code, which worked under 2.7.x and earlier:
<ul> <?php $future_events = new WP_Query('category_name=Calendar&post_status=future&order=ASC&showposts=5'); while ($future_events->have_posts()) : $future_events->the_post(); $do_not_duplicate = $post->ID; ?> <li> <span class="date"> <?php the_time('M. j | g:i a'); ?> </span><br /> <a href="<?php the_permalink() ?>"> <?php// the_title(); ?> </a> </li> <?php endwhile; ?><?php rewind_posts(); ?> </ul>
Any thoughts/suggestions?
Thanks!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Mini-loop won’t rewind since 2.8 upgrade’ is closed to new replies.