{"id":34534,"date":"2013-07-09T20:30:33","date_gmt":"2013-07-09T15:00:33","guid":{"rendered":"https:\/\/www.quickonlinetips.com\/archives\/?p=34534"},"modified":"2020-05-24T11:04:05","modified_gmt":"2020-05-24T05:34:05","slug":"add-updated-date-markup","status":"publish","type":"post","link":"https:\/\/www.quickonlinetips.com\/archives\/2013\/07\/add-updated-date-markup\/","title":{"rendered":"How to Add Last Modified Date \/ Updated Time Markup to WordPress Articles"},"content":{"rendered":"<p>It is very important to add last modified date and updated dates \/ time markup to your blog articles. Google and other search engines are tweaking their algorithms to favor fresh content. If you test your site on the <a href=\"https:\/\/search.google.com\/structured-data\/testing-tool\" target=\"_blank\" rel=\"noopener noreferrer\">structured data tool<\/a>,\u00a0it seems<strong> Updated date<\/strong> has become a necessary <a href=\"http:\/\/microformats.org\/wiki\/hentry\" target=\"_blank\" rel=\"noopener noreferrer\">hentry<\/a> requirement if you do microformats markup for all site pages. This is beside the article published date!<\/p>\n<p><img decoding=\"async\" class=\"alignright size-full wp-image-34540\" src=\"https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/updated.jpg\" alt=\"updated\" width=\"200\" height=\"200\" srcset=\"https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/updated.jpg 200w, https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/updated-150x150.jpg 150w\" sizes=\"(max-width: 200px) 100vw, 200px\" \/>We have added the updated date to all our posts, besides the published post date. This is a good idea as people update old articles and content and this provides an official way for search engines to know when the content was updated. WordPress will save the date your content was updated and will help you publish the updated date easily.<\/p>\n<h3>What if you do not publish updated date?<\/h3>\n<p>If no Entry Updated element is present, it defaults to Entry Published element, and if that too is absent, then its\u00a0invalid hAtom markup.<\/p>\n<p>It is important that you add the post updated mark up to your html code and help search engines know when your post was last updated. Its is also important NOT to fool search engines like Google by labeling all content as updated today, if there are no changes in your page, because they are smart enough to detect changed content.<\/p>\n<h2>How to markup the last modified date?<\/h2>\n<p>Use this simple class <strong><em>updated<\/em><\/strong> to specify the updated date in your html code.<\/p>\n<h3>Can WordPress automatically display updated date?<\/h3>\n<p>Its easy. We use this code with the <code>date<\/code> and <code>updated<\/code> class. Then the <code>the_modified_time<\/code> php code prints the updated date automatically.<\/p>\n<pre><code>&lt;span class=\"date updated\"&gt;&lt;time datetime=\"&lt;?php the_modified_time('d\/m\/Y'); ?&gt;\"&gt;&lt;?php the_modified_time('d\/m\/Y'); ?&gt;&lt;\/time&gt;&lt;\/span&gt;<\/code><\/pre>\n<p>This code will publish the time your post was last updated. This is not the same \u00a0as your post published date (which should have a <code>published<\/code>\u00a0class). You can choose different date format than\u00a0<code>d\/m\/Y<\/code>\u00a0as allowed by <a href=\"https:\/\/codex.wordpress.org\/Formatting_Date_and_Time\" target=\"_blank\" rel=\"noopener noreferrer\">PHP time tags<\/a>\u00a0to customize the updated date the way you like it.<\/p>\n<p>For example\u00a0<code>Y\/m\/d g:i:s A<\/code>\u00a0will output the date as 2013\/07\/09 12:51:28 AM<\/p>\n<h3>Should you replace original date with updated date?<\/h3>\n<p>Readers would like to know when the content was published. Outdated content corrected for grammatical errors will give a new updated date, but that does not make the 5 year old news item new for the reader. So we prefer to \u00a0keep both dates on our pages.<\/p>\n<p><strong>Update<\/strong>: learn how to <a href=\"https:\/\/www.quickonlinetips.com\/archives\/2013\/12\/add-updated-date-wordpress\/\">add updated date to WordPress themes<\/a> like 2013 or 2014 theme.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It is very important to add last modified date and updated dates \/ time markup to your blog articles. Google&#8230;<\/p>\n","protected":false},"author":4,"featured_media":34540,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[6,41],"tags":[49,17],"class_list":["post-34534","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogging","category-search-engine-optimization","tag-tutorials","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts\/34534","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/comments?post=34534"}],"version-history":[{"count":0,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts\/34534\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/media\/34540"}],"wp:attachment":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/media?parent=34534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/categories?post=34534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/tags?post=34534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}