{"id":67963,"date":"2012-01-01T08:00:20","date_gmt":"2012-01-01T13:00:20","guid":{"rendered":"http:\/\/wpmu.org\/?p=67963"},"modified":"2013-04-27T16:12:11","modified_gmt":"2013-04-27T20:12:11","slug":"daily-tip-how-to-automatically-display-current-date-in-wordpress","status":"publish","type":"post","link":"https:\/\/wpmudev.com\/blog\/daily-tip-how-to-automatically-display-current-date-in-wordpress\/","title":{"rendered":"How to Automatically Display Current Date in WordPress"},"content":{"rendered":"<p><a rel=\"lightbox[67963]\" class=\"blog-thumbnail\" href=\"https:\/\/wpmudev.com\/blog\/daily-tip-how-to-automatically-display-current-date-in-wordpress\/calendar-big-3\/\" rel=\"attachment wp-att-67964\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-67964\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2011\/12\/calendar-big2.jpg\" alt=\"Post image\" aria-hidden=\"true\" width=\"649\" height=\"649\" \/><\/a><\/p>\n<p>In order to get the current date to automatically display in your WordPress site, you just need to add a line of code to your theme wherever you would like it to show up. (Appearance &gt; Editor)<\/p>\n<p>An example would be to add the following line of code:<\/p>\n<pre style=\"padding-left: 30px;\">&lt;?php echo date('l jS F Y'); ?&gt;<\/pre>\n<p>After adding that line to my header.php file, here&#8217;s the result.<\/p>\n<p><a rel=\"lightbox[67963]\" class=\"blog-thumbnail\" href=\"https:\/\/wpmudev.com\/blog\/daily-tip-how-to-automatically-display-current-date-in-wordpress\/current-date\/\" rel=\"attachment wp-att-67975\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-67975\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2011\/12\/current-date.jpg\" alt=\"Post image\" aria-hidden=\"true\" width=\"628\" height=\"368\" \/><\/a><\/p>\n<p>You can configure the date to appear as you like. For more information on your options, see the <a href=\"http:\/\/codex.wordpress.org\/Formatting_Date_and_Time\" rel=\"noopener\" target=\"_blank\">WordPress Date and Time page<\/a>.<br \/>\n<\/p>\n<p>Photo: <a href=\"http:\/\/www.bigstockphoto.com\/image-11761088\/stock-photo-new-year%27s-day-calenda\" target=\"_blank\">New Year&#8217;s Day Calendar<\/a> from BigStock<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Put this one line of code anywhere you like in your theme.<\/p>\n","protected":false},"author":84404,"featured_media":67968,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"blog_reading_time":"","wds_primary_category":0,"wds_primary_tutorials_categories":0,"footnotes":""},"categories":[263],"tags":[655],"tutorials_categories":[],"class_list":["post-67963","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-pages"],"_links":{"self":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/67963","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/users\/84404"}],"replies":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/comments?post=67963"}],"version-history":[{"count":1,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/67963\/revisions"}],"predecessor-version":[{"id":216252,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/67963\/revisions\/216252"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media\/67968"}],"wp:attachment":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media?parent=67963"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/categories?post=67963"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tags?post=67963"},{"taxonomy":"tutorials_categories","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tutorials_categories?post=67963"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}