You just need to compare values of get_the_post_time() and get_the_modified_time().
if ( get_the_post_time() == get_the_modified_time() ) {
// Published on...
} else {
// Modified on...
}
Related Posts:
- How to remove a date from wordpress post
- How to get post creation date?
- Changing the post date and time with function
- Is it possible to Schedule Attachments in WordPress?
- using wp_update_post on save_post
- How to put last edited entry on top of the blog-post list?
- Query posts from current year
- Update existing post dates to random dates
- Post X of Y in single.php / sidebar.php
- featuring old articles without messing up with the archive
- How do I change the gallery that is inserted in the post?
- How to allow slashes in single posts when i click in the edit permalink button
- Human Time Diff, change mins to minutes
- How to get new post URL?
- Display custom post types by date field
- How can I display a specific user’s first published post?
- Fetch posts from current week (Sunday to Saturday)
- Convert a complex webpage into WP theme
- How to set post expiration date and time and move the page to archive after expiration [closed]
- Display post from specific date
- Get random posts between specific dates / of specific age
- Animated gif for a thumbs
- Automatically republish old posts
- Why orderby=”date” does not support manually changed posts?
- Removing rel=”nofollow” from links posted in Post Content
- How can I show many posts an author has per week?
- If modified on same day, show only time
- Why aren’t my posts/pages showing up in my WordPress Theme?
- Blog page not working
- How to change the color theme per post?
- WordPress Sidebar menu for posts based on date – guidance needed
- Worpdress function for difference dates
- Shortcodes on my website stops working after theme update [closed]
- WordPress website loads more posts than expected
- Changing default WP-Site creation date
- How to get posts published on the latest date?
- Benefits to using semantic HTML in post content? [closed]
- How to identify and hide/remove an element from a WordPress page [closed]
- What date to use as a post date? date_gmt or modified_date_gmt
- Images showing up in Post Editor, but not in Published Post
- $_GET parametters not working in an specific template
- Assigning Two Different Post Dates For Single Post
- Custom Articles page only showing a limited number of posts per page
- Getting Whitescreen when publishing a post [closed]
- Modify this line to give alternate format date?
- Post: how to set created date after post has been published [closed]
- Add “Posted on” to post date
- wp_query if have posts show date but not in loop
- How do I link a Post Type to a Template in Masterplan?
- Change the background of each post according to the category
- Date is wrong on ‘all posts’ page
- Page of posts made to look like homepage
- Order posts by date
- Will multiple category descriptions effect my search engine optimization?
- Get post publishing date from within custom HTML block
- Post date automatically +100 years into the future
- Display a specific category in a focused area of my site
- Change Old WordPress Post Date Year
- My website is showing today’s date instead of published date since db migration to a new wordpress
- How can I change the date format of the revision list?
- Related post not showing table of content
- How to add a custom class attribute into code wrapper? [duplicate]
- Include Recent Post in Category
- How can get the last post date of the user?
- How to get post creation date?
- Need to display a Jan 1st post as the site’s front page on Jan 1st, and Jan 2nd post as front page on Jan 2nd etc
- Set a post expiration and delete a post when expirate
- Display Updated Date Instead of Published Date
- How do you update post date (year only) in a separate custom field?
- Hiding title of selected post without plugins
- How to hide meta from search result only on pages?
- How do I display posts ordered by a date custom field?
- Post URL duplication adds numerical value
- How can I set and update the the_date according to a custom field of the post
- Set post beginning date and final date
- Skip posts, but keep posts per page
- How to display an icon when a new post is published and then remove it when a specific time past?
- Latest Posts not in the right order
- How to organise post by category and date
- Display metabox with date
- wordpress taxonomy results
- How do I get the WordPress post to display the content instead of an image?
- Last three posts not being put in order by date. How to fix this?
- How to change text (date) in post base on the day
- Automatically delete default posts and pages on theme install?
- Extra Theme – Fit image inside of Featured Post Slider
- Is there any SEO impacts on unattached vs attached images for a post in WordPress?
- Password protection doesn’t prompt for password on pages
- Get posts after calculating meta key
- wordpress pinboard theme [closed]
- Is there a block to print post link standalone in a block theme?
- how show post date for specific post?
- Hindi content automatically converting to unreadable language?
- Exclude posts by date – related post
- Edit Page button is gone
- Twenty Twenty-Four: Static Front Page with Post Links
- How to get total posts count for each date?
- How can I create Woodmart theme “linked variations” through REST API?
- Show posts assigned to multiple categories in current category page
- Blog page shows the whole blog post instead of the excerpt or summary with the feature image only