Support » Fixing WordPress » displaying the_date() using WP_Query

  • Resolved lamarant

    (@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:

    `
    <?php
    $wp_query= null;
    $wp_query = new WP_Query();
    $wp_query->query(‘showposts=5′.’&paged=’.$paged);
    ?>
    <?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>
    <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>
    <div class=”More”>
    ” title=”Continue Reading: <?php the_title(); ?>”>Continue Reading »
    </div>
    </div>
    </div>
    </div>

    <?php endwhile; ?>

    Here’s the link to the page:
    http://www.leonamarant.com/blog/

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.