Search for: Log In Free Support [Resolved] Add Time to post meta Home › Forums › Support › Add Time to post meta This topic has 5 replies, 3 voices, and was last updated 1 year, 3 months ago by Tom. Viewing 6 posts - 1 through 6 (of 6 total) Author Posts January 15, 2020 at 11:33 am #1133322 Brian I would like to add the time in the meta for a specific post was written when viewing that individual post. Like: January 13, 2020 2:15PM by Brian Jones January 15, 2020 at 12:55 pm #1133402 LeoStaff Customer Support Hi there, Does this help? https://gist.github.com/generatepress/8bc94ae43f67c40a077aefc8ec970fd0 Let me know π Documentation: http://docs.generatepress.com/ Adding CSS: http://docs.generatepress.com/article/adding-css/ January 15, 2020 at 1:18 pm #1133425 Brian That is the snippet I have been looking at but it ends up showing “Updated on: by Robert Jones” – missing the actual date/time there. January 15, 2020 at 5:12 pm #1133548 TomLead Developer Lead Developer Instead of using code, go to “Settings > General” and set your time format to something like this: F j, Y g:i a Documentation: http://docs.generatepress.com/ Adding CSS: http://docs.generatepress.com/article/adding-css/ Ongoing Development: https://generatepress.com/ongoing-development January 16, 2020 at 8:32 am #1134242 Brian My settings already were set to that. I changed that function a little to this and it works fine now: $time_string = sprintf( $time_string, esc_attr( get_the_date() ), esc_html( get_the_date() ), esc_attr( get_the_time() ), esc_html( get_the_time() ), esc_attr( get_the_modified_date( ‘c’ ) ), esc_html( get_the_modified_date() ) ); January 16, 2020 at 10:14 am #1134354 TomLead Developer Lead Developer Awesome, glad you got it working π Documentation: http://docs.generatepress.com/ Adding CSS: http://docs.generatepress.com/article/adding-css/ Ongoing Development: https://generatepress.com/ongoing-development Author Posts Viewing 6 posts - 1 through 6 (of 6 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In