Support » Fixing WordPress » displaying the_date() using WP_Query

  • Resolved lamarant


    I created a template for my blog home page that should simply list all of my blog posts in chronological order. The list displays correctly but the problem is that the date displayed for every post is the same as the first one.

    Here’s my code:

    $wp_query= null;
    $wp_query = new WP_Query();
    <?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
    <div class=”BlogItem Sub”>
    <div class=”Meta”>

    <?php the_date(); ?>
    { <?php the_category(‘: ‘); ?> }
    { <?php comments_number(‘0 Comments’, ‘1 Comment’, ‘% Comments’); ?> }

    <div class=”DescWrapper”>
    <div class=”InnerPadding”>
    <div class=”Title”>” title=”Visit: <?php the_title(); ?>”><?php the_title(); ?></div>
    <div class=”Description”>
    <?php the_excerpt(); ?>
    <div class=”More”>
    ” title=”Continue Reading: <?php the_title(); ?>”>Continue Reading »

    <?php endwhile; ?>

    Here’s the link to the page:

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘displaying the_date() using WP_Query’ is closed to new replies.