Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 924235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:19:09+00:00 2026-05-15T19:19:09+00:00

I have made a custom loop in WordPress and for some reason, the date

  • 0

I have made a custom loop in WordPress and for some reason, the date is being skipped on random intervals, even though the other post content is getting pulled in successfully every time.

Any ideas, because it is completely baffling me!

For example, a list of posts and when the date is missing:

  1. Date
  2. Date
  3. No date
  4. Date
  5. Date
  6. No date
  7. Date
  8. No date
  9. No date
  10. No date

Here is the code, including all the loops:

    <?php query_posts('category_name=News&posts_per_page=10'); ?>
    <?php while (have_posts()) : the_post(); ?> 

    <article>
        <div>
            <p>PUBLISHED: <?php the_date(); ?></p>
            <h4><a class="news_title_link" href="<?php the_permalink();?>"><?php the_title();?></a></h4>
            <?php the_excerpt(); ?>
            <br />
            <a href="<?php the_permalink();?>">Read more</a>
        </div>  
        <div>
        <?php if ( function_exists( 'get_the_image' ) ) { get_the_image(array('default_size' => 'thumbnail','default_image' => '/wp-content/uploads/2010/06/default-thumb.jpg'));} ?>
        </div>
    </article>

    <?php endwhile; ?>
    <?php endif;?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T19:19:10+00:00Added an answer on May 15, 2026 at 7:19 pm

    One likely cause could be that the consecutive posts with no dates are all published on the same day as the one with a date that they all immediately follow.

    In your example, the second and third posts may have the same publish date, which is causing the third post to not display a date. Likewise, posts 7 to 10 may share the same publish date, which is causing the last three posts to not display dates.

    That, as far as I’ve experienced, is how the_date() works. It prints a unique date only once throughout a loop.

    I work around it by either:

    • Using the_time() instead of the_date() and specifying a full date format, or
    • Calling unset($previousday) just after my the_post() call
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 478k
  • Answers 478k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer final Demo : http://jsfiddle.net/VdFD9/ If you would like to do… May 16, 2026 at 5:40 am
  • Editorial Team
    Editorial Team added an answer Try FiddlerCore: FiddlerCore allows you to integrate HTTP/HTTPS traffic viewing… May 16, 2026 at 5:40 am
  • Editorial Team
    Editorial Team added an answer The default behaviour for XMLSerializer is hitting a loop because… May 16, 2026 at 5:40 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.