Divi: the easiest WordPress theme to use
Divi: The best WordPress theme of all time!
With over 901.000 downloads, Divi is the most popular WordPress theme in the world. It is complete, easy to use and comes with more than 62 free templates. [Recommended]
Have you ever wanted to change the date format on WordPress? Maybe you want to shorten the month or hide the year in your website date?
If this is your case, then do not worry, because in this tutorial I will teach you how to change the date format on WordPress.
But before, if you have never installed WordPress discover How to Install a WordPress Blog in 7 Steps et How to search, install and activate a WordPress theme on your blog
Then back to why we are here.
The date and time in WordPress
By default, WordPress offers a feature that allows users as well as developers to change the date format. It is possible to modify the date format from the " Settings >> General ", On the option" Date Format "And" Time format ».
This is where it is possible to modify the time and date format of your website, either by choosing a predefined format, or by directly modifying the format.
Explanation of the date and time characters in WordPress
The date and time format is based on letters of the alphabet, which represent a fraction of a time or date format. For example, the letter " Y "Reference to the year in digital form, so" 2014 ". For example for "y", "14" will be displayed.
Here are some concrete examples on the use of time and date formats.
- « M d, Y : Will display Nov 10, 2014
- « D M, Y : Will display 10 Nov, 2014
- « F jS, Y : Will display November 10, 2014
- « l, F jS, Y : Will show Tuesday, November 10, 2014
- « H: i: s : Will display 10: 11: 30
You can try several custom sizes in the " custom "Located at the end of the option" Date Format "And" Time format ».
Once you've added your custom size, save your settings. This format will be used everywhere on your blog, until your WordPress theme decides to use another custom format.
Easily create your website with Elementor
Elementor allows you to easily create any website design with a professional look. Stop paying expensive for what you can do yourself. [Free]
Another question commonly asked about date and time is how to display the time just after dates in WordPress posts.
The most difficult solution, but certainly the best one is to change the theme by creating a " Child Theme And add the following line where you want to display the time.
<? php get_the_time ();?>
This code will retrieve the time for a page or an article.
All the time, most beginners do not want to create a child theme (child theme) and access the source code directly.
Technically, when WordPress displays dates, it displays the full date and time format. However, most users use the format that only displays the date, which is why this short format was preferred. If you add the corresponding letters to the time in the date format, well the time will also be displayed.
For example: "D / m / Y g: i": will display 10 / 11 / 2014 11: 15
Also, you can use the date format in the time field to produce the same result.
Depending on your needs, there are several things you can do with the date and time in WordPress. For example, you can display the last modified date of an article, instead of the published date.
Are you looking for the best WordPress themes and plugins?
Download the best plugins and WordPress themes on Envato and easily create your website. Already more than 49.720.000 downloads. [EXCLUSIVE]
Go further with How to remove the dates of comments on WordPress
Discover also some premium WordPress plugins
You can use other WordPress plugins to give a modern look and optimize the grip of your blog or website.
We offer you here some premium WordPress plugins that will help you do that.
1. WordPress Thumby Related Posts Widget
WP Thumby Related Posts plugin can help you improve your WordPress website statistics and especially your visitors' engagement by setting up a landing page that leads them to other relevant and similar content.
You can get more page views for the price of one. Thanks to this plugin, when visitors come to your website, very nice and high quality thumbnails grab their attention to offer them other useful things on the website.
Find out about other recommended resources to help you build and manage your website.
- How to fix mixed content error on WordPress
- How to fix 413 error on WordPress
- How to rename images on a WordPress blog
- What is the difference between H1 and the SEO title of a WordPress article?
Here ! That's it for this little guide on using time and date formats in WordPress. Do not hesitate to share with your friends on your favorite social networks.
If you have suggestions or remarks, leave them in our section Comments.