Home › Forums › Support › How to add last modified date to bottom of posts? This topic has 8 replies, 2 voices, and was last updated 6 years, 11 months ago by Tom. Viewing 9 posts - 1 through 9 (of 9 total) Author Posts May 20, 2017 at 10:22 am #321319 Kevin Hey, quick question here. If I wanted to have this display at the bottom of my posts, how would I do it? This post was last updated on [date post was last modified]. May 20, 2017 at 8:21 pm #321464 TomLead Developer Lead Developer Hi Kevin, Would this display on single posts only, or the blog as well? Let me know ๐ May 22, 2017 at 12:37 pm #322398 Kevin Apologies on the slow response! This would be for single posts only, no archive, category, or pages. May 22, 2017 at 8:15 pm #322612 TomLead Developer Lead Developer Try this in the After Content hook in GP Hooks: <?php if ( is_single() ) { if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = '<time class="updated" datetime="' . esc_attr( get_the_modified_date( 'c' ) ) . '" itemprop="dateModified">' . esc_html( get_the_modified_date() ) . '</time>'; echo 'This post was last updated on ' . $time_string; } } ?> May 22, 2017 at 9:36 pm #322628 Kevin Hey Tom! Thanks, but question: Here’s the code in ‘After Content’ View post on imgur.com And here’s the display: View post on imgur.com Any ideas? May 22, 2017 at 9:36 pm #322629 Kevin I have Execute PHP checked, btw. May 22, 2017 at 11:59 pm #322657 TomLead Developer Lead Developer I just edited the code above – can you try again? May 23, 2017 at 9:03 am #322934 Kevin All good, Tom. Thanks so much for the help! May 23, 2017 at 2:21 pm #323110 TomLead Developer Lead Developer You’re welcome ๐ Author Posts Viewing 9 posts - 1 through 9 (of 9 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In