{"id":29750,"date":"2010-03-31T16:01:35","date_gmt":"2010-03-31T20:01:35","guid":{"rendered":"http:\/\/wpmu.org\/?p=29750"},"modified":"2012-10-02T23:00:19","modified_gmt":"2012-10-03T03:00:19","slug":"daily-tip-how-to-use-fuzzy-dates-for-wordpress-posts-and-comments","status":"publish","type":"post","link":"https:\/\/wpmudev.com\/blog\/daily-tip-how-to-use-fuzzy-dates-for-wordpress-posts-and-comments\/","title":{"rendered":"How to Use Fuzzy Dates For WordPress Posts"},"content":{"rendered":"<p>Many social networking sites display dates and times as relative to the current day- ie. &#8216;Today&#8217;, &#8216;Yesterday&#8217;, &#8216;2 Days Ago&#8217;, &#8216;2 Weeks Ago&#8217;, &#8216;2 &#8216;Seconds Ago&#8217;, &#8216;2 Minutes Ago&#8217;, &#8216;2 Hours Ago&#8217;.<\/p>\n<p>You can do this too with your WordPress updates. Grab the <a href=\"http:\/\/wordpress.org\/extend\/plugins\/wp-relativedate\/\" rel=\"noopener\" target=\"_blank\">WP-Relative Date<\/a> plugin and install it. Then, open your <em>index.php, single.php, page.php<\/em> or any other file using the_date and edit as follows:<\/p>\n<h4>Replace this:<\/h4>\n<p><code>&lt;?php the_date(); ?&gt;<\/code><\/p>\n<h4>With this:<\/h4>\n<p><code>&lt;?php relative_post_the_date(); ?&gt;<\/code><\/p>\n<p>Now you should have &#8220;fuzzy&#8221; dates for your updates. :)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Many social networking sites display dates and times as relative to the current day- ie. &#8216;Today&#8217;, &#8216;Yesterday&#8217;, &#8216;2 Days Ago&#8217;, &#8216;2 Weeks Ago&#8217;, &#8216;2 &#8216;Seconds Ago&#8217;, &#8216;2 Minutes Ago&#8217;, &#8216;2 Hours Ago&#8217;. You can do this too with your WordPress updates. Grab the WP-Relative Date plugin and install it. Then, open your index.php, single.php, page.php [&hellip;]<\/p>\n","protected":false},"author":4099,"featured_media":0,"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":[1,557,4,263],"tags":[],"tutorials_categories":[],"class_list":["post-29750","post","type-post","status-publish","format-standard","hentry","category-news-community","category-development","category-plugins","category-tutorials"],"_links":{"self":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/29750","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\/4099"}],"replies":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/comments?post=29750"}],"version-history":[{"count":2,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/29750\/revisions"}],"predecessor-version":[{"id":181379,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/29750\/revisions\/181379"}],"wp:attachment":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media?parent=29750"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/categories?post=29750"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tags?post=29750"},{"taxonomy":"tutorials_categories","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tutorials_categories?post=29750"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}