Some Dates Not Showing
-
I have a rather odd problem troubling me. Some dates just refuse to show. But it only happens once the post is kicked down to my “second loop”. I have the first post showing in all its glory then the next ten just as headlines, and it’s these that are causing me trouble. Here’s my code (without the html):
<?php if (have_posts()) : ?> <?php $my_query = new WP_Query('showposts=1'); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID; ?> <div id="post-<?php the_ID(); ?>"> <?php the_title(); ?> <?php the_date(); ?> <?php the_author(); ?> <?php the_content('Read the rest of this entry »'); ?> <?php the_category(', ') ?> <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?> </div> <?php endwhile; ?> <?php if (have_posts()) : while (have_posts()) : the_post(); if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts); ?> <div id="post-<?php the_ID(); ?>"> <?php the_title(); ?> <?php the_date(); ?> <?php the_category(', ') ?> </div> <?php endwhile; endif; ?>
If I’m allowed to link you can see the problem live here: https://www.simcitycentral.net/ Just scroll down a bit.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Some Dates Not Showing’ is closed to new replies.