WordPress Post Date Not Showing

Have you experienced to have a list of WordPress posts and noticed that some dates are now showing?

Let’s say there are 5 posts. Some of them have correct published date and some of them have empty dates.

The Problem

I noticed that <?php the_date(); ?> is the short code I used.

The Fix

It was fixed when I use <?php the_time(‘F j, Y’); ?> code.

Hope you learn something!

 

*Some links may contain affiliate links. I may get small commission from your purchases to fund this website and to avoid annoying ads.