How to Display Current Date in WordPress (Simple Ways) 2024

Displaying current date on WordPress website gives you the fresh appearance. It shows that your website is upto date and relevant. The current date displaying on your WordPress website helps user to get the idea of date of published article. In this article we will tell you the procedure of How to Display Today’s Date in WordPress.

Display Current Date in WordPress

Display Current Date

Displaying Current Date date on your wordpress website will helps to improve the user experience by providing a clear sense of time and place within the website. With current date displaying on the header section, users can easily see when they are viewing the content and whether it’s current or historical. Displaying current date also helps in better SEO for your wordpress website, because for content like news articles, displaying the publication date is very necessary for user engagement. Search engines can use this date information to judge the freshness and relevance of content in search results.

WordPress Customization Tutorial

Importance of Display Current Date in WordPress

Display Current Date on a WordPress website can help website owners in various purposes and it also has multiple benefits, depending on the type of website and its goals. Here are some of the reasons why displaying today’s date on a WordPress website can be important-

  • Blogging and Publishing– WordPress is mainly used for blogging and content publishing. Displaying the date on individual blog posts can helps readers or website visitors to understand when the content was published. This is important for credibility and authenticity of your website
  • Event Promotion– Websites that are mainly focused on promoting events, conferences, or activities can benefit heavily by displaying the current date on their homepage. Therefore displaying date on website will helps visitors to quickly identify the date and timing of an event.
  • E-commerce and Sales– WordPress website focusing on e-commerce will get benefited by displaying today’s date on their homepage. Displaying current date can be used to create a sense of urgency, thus encouraging visitors to make a purchase by highlighting limited-time offers or deals.
  • User Engagement– Displaying the current date can encourage user engagement by telling that the website is actively maintained and the fresh content is uploading on regular basis. User engagement can lead to high web traffic.
  • Time-sensitive Content– Some websites publishes content that is relevant only for a specific period, such as promotions, seasonal information, or holiday-themed content therefore displaying today’s date on these type of wordpress websites can help users to identify the relevance of such content.

How to Display Current Date in WordPress

You can display current date in your wordpress website by multiple different methods. We will discuss all the methods to display current on wordpress website below. We will advise you to take backup of your website, so that you can retrieve the precious data of your website in any unwanted scenarios. Here we are sharing different way to display today’s date in wordpress in simple step by step procedure.

How to Display Current Date by Using WordPress Date Widget

  • Firstly log in to your WordPress admin dashboard.
  • After logging in navigate to “Appearance” tab in the left sidebar and click on Widgets
  • On the Widgets page, search the “Date” widget in the list of available widgets.
  • Now Drag and drop the “Date” widget to the widgetized area where you want to display the date, for example a sidebar or footer.
  • In the widget settings, you can customize the date format, title, and other options.
  • You can choose to display the date as “Current date” or “Today’s date.”
  • Click the “Save” button to save your widget settings.
  • Lastly visit your WordPress site, and check that today’s is date displaying in the widget area.

10+ Best Website Ideas

How to Display Current Date by Using WordPress Date Shortcode

If you want to display today’s date within a post or page content, you can create a custom shortcode for it:

  • In the WordPress admin dashboard of your WordPress website, navigate to “Plugins” and click on “Add New.”
  • In the search bar, type “Shortcoder” or a similar shortcode plugin and install it. Shortcoder is a popular plugin for creating custom shortcodes, but there are alternatives if you prefer.
  • After installing and activating the plugin, go to “Shortcoder” in your dashboard’s left sidebar.
  • Click the “Add New Shortcode” button.
  • In the “Add New Shortcode” page, give your shortcode a title (e.g., “Today’s Date”).
  • In the “Shortcode Content” box, enter the following PHP code to display today’s date

function wpb_date_today($atts, $content = null) {

extract( shortcode_atts( array(

        ‘format’ => ”

    ), $atts ) );

if ($atts[‘format’] == ”) {

$date_time .= date(get_option(‘date_format’));

}  else {

$date_time .= date($atts[‘format’]);


return $date_time;



  • You can adjust the date format within the date() function as needed.
  • Here you can also specify a custom shortcode tag (e.g., [todays_date]) in the “Shortcode” field.
  • Click the “Create Shortcode” button.
  • Now, when you edit a post or page, you can use your custom shortcode (e.g., todays_date) to display today’s date.
  • Save or update your post or page, and the current date will be displayed on your wordpress website.

How to Display Current Date by Using WordPress Date Plugin

If you want to use wordpress plugin to display today’s date in your wordpress website then we are delighted to tell you that there are multiple WordPress plugins available online that can help you in displaying today’s date and more advanced date-related features. WP Date and Time Shortcodes and Simple Yearly Archive are the few most popular wordpress date plugin.

How to Display Today’s Date by Using Using JavaScript

You can use JavaScript to display the current date on your WordPress website. Displaying Today’s date by using Using JavaScript is a very useful method for real-time updates without the need of refreshing the page. You can add the below mentioned javaScript code snippet to your theme’s footer or use a custom JavaScript plugin.


    var currentDate = new Date();

    document.getElementById(‘current-date’).innerHTML = currentDate.toDateString();


It is important to know that in your HTML or WordPress content, you need to include an element with the id ‘current-date’ where you want the date to appear

We hope this article helps you in displaying current date in your WordPress website. Visit our website regularly for more interesting articles on blogging and digital marketing

Leave a Comment