How to Display Today’s Date in WordPress?

All you need to do is place the following code in a theme file of your choice, most commonly in header.php:

Tables can't be imported directly. Please insert an image of your table which can be found here.

1

The above code will display the date in the following format:

Thursday, 17th September 2009

If you do not like the formatting above, you can look at the PHP Date Manual for other parameters.

Now another way to do this is by just extracting your WordPress admin settings. You can go to Settings > General and select the date format in there and simply add this code instead of the above one:

Tables can't be imported directly. Please insert an image of your table which can be found here.

1

Was this article helpful?
0 out of 0 found this helpful