views:

11

answers:

1

Hi everyone,

I have a news section that shows posts only with a category of "news". The code is shown below.

The problem is, only the first news post gets a date above it. All the posts following the most recent "news post" don't have dates. Anyone have any idea why this is happening?

Thanks!

Amit

<div id="news">

            <?php $my_query = new WP_Query('category_name=news&posts_per_page=6'); ?>
                <marquee ONMOUSEOVER="this.stop();" ONMOUSEOUT="this.start();" direction="up" scrollamount="2" id="newsMarquee">

                <?php if (have_posts()) : while ($my_query->have_posts()) : $my_query->the_post(); ?>

                    <div class="post">
                        <p class="date"><?php the_date(); ?></p>
                        <?php the_content('Read the rest of this entry &raquo;'); ?>
                        <div class="clear"></div>
                    </div>

                <?php endwhile; endif;?>

                </marquee>

        </div><!-- /#news -->
A: 

Fixed problem.

Had to change the <?php the_date(); ?>

to:

<?php the_time('F jS, Y') ?>

Hope that helps anyone out there.

Amit