Give this a try:
if(get_the_modified_date('zY')==date('zY')) {
the_modified_date('g:i a');
} else {
the_modified_date('F j, Y'); echo ' at '; the_modified_date('g:i a');
}
It checks that the modified date is the current day. If it is, it only displays the modified time. Otherwise it displays both the date and time.
Related Posts:
- Update post date on every new comment?
- How to output comments number of a post per day?
- How can I show many posts an author has per week?
- Update all comments time to random dates?
- Changing default WP-Site creation date
- Date is wrong on ‘all posts’ page
- Bulk update published posts date randomly using wp-cli?
- Set a post expiration and delete a post when expirate
- How do you update post date (year only) in a separate custom field?
- How to display a certain template element only for posts published within certain time range?
- How to get posts published between a date and today?
- How to get post creation date?
- How to make comments work for a post loaded per Ajax?
- Changing the post date and time with function
- Connection lost. Saving has been disabled… (Updating Posts/Pages)
- Is it possible to Schedule Attachments in WordPress?
- Allow variable amount of comments before pagination
- Post/Page Publish/Update button not clickable once I make an edit
- How to schedule multiple posts while adding new
- using wp_update_post on save_post
- order posts by date like craigslist
- get comments and get posts in loop
- How to put last edited entry on top of the blog-post list?
- Query posts from current year
- How to batch update post content with custom post meta value
- Updating a post without escaping ampersands?
- How to display comments and comment form on custom post type?
- Comments are assigned to wrong or related post
- How can I allow editors to leave comments on posts that have not yet been published?
- Update existing post dates to random dates
- featuring old articles without messing up with the archive
- One comment per user email per post
- Can’t show comments count per post outside loop
- Only display posts with comments
- Comments enabled, but disabled at the same time
- Mass Update lines of code for all posts
- Comments not showing in custom post type – WordPress
- How to display an icon when a new post is published and then remove it when a specific time past?
- Human Time Diff, change mins to minutes
- Enable commenting on front-end preview page for pending posts
- Display custom post types by date field
- Hide comments awaiting moderation from user who submitted the comments
- Unable to modify(update) posts – Page not found
- How can I display a specific user’s first published post?
- How to get the latest posting time of archived pages in WordPress?
- Can wordpress differentiate between added and updated posts?
- Fetch posts from current week (Sunday to Saturday)
- Hide Post comments when displayed via WP_Query
- Including new Javascript only after a comment is made
- How to insert current date/time in the content of a post?
- Disable Post/Page comment emails for creators
- How do I batch create revisions of all posts?
- Display posts with comments closed, with pagination?
- How to set post expiration date and time and move the page to archive after expiration [closed]
- Why is WordPress redirecting users to random posts after commenting?
- How to get most recent commented post above new submitted post in WordPress?
- How to get the date of a post in WordPress, so I could use it in a script?
- When trashing a post, also trash related comments
- how to find user ids of all commenters in a post
- Diplay comment date on WP_Post_Comments_List_Table
- Display post from specific date
- Get random posts between specific dates / of specific age
- XML-RPC and post_date
- Posts vs. Pages
- Automatically republish old posts
- count the total number of comments the user has received for his published posts
- Automatically Updating Publish Date Bug
- Replace ‘published on date’ with ‘modified on date’ on Posts
- pre_get_posts query between 2 dates (date stored in custom post meta)
- How to Orderby Comments by post title?
- custom post scheduler for drafts
- How to allow logged in users to post anonymously
- Email entire post contents
- Query get post,how to add comment box
- Enable Comments Box On Custom Post Type
- Turn On Comments On Custom Post Types in Directory Theme
- Emojis replaced by ‘?’ automatically
- Prevent scheduled post being published if date/time is past current date/time
- Automatically add date to the auto generation of post slug
- Move comments only from one WP installation to another
- WordPress Sidebar menu for posts based on date – guidance needed
- Second comments section for one post/page
- A friend wants to make a comment on one of my articles, she has to be logged to wordpress?
- Get all images in post and comments like Twitter before post title
- Is it possible to paste a link without tags and make it directly a link in a post?
- Showing author page if user has no post
- Customizing Comments on Posts
- date issue with category post retrival
- WordPress Comment posting problem
- How i can limit period of post publication?
- What do comments with […] mean?
- How to get date of post when using wp_get_recent_posts()?
- What do these phpMyAdmin errors mean on my WordPress databaes?
- Internal post link creates comments on its own
- Worpdress function for difference dates
- How to get posts and comments amount per hour, per year and per month?
- Show comment number per author per day
- Get all comments of author’s posts
- SQL Command for restoring trashed comments
- Howto show comment count by post in post?