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 posts published between a date and today?
- How to get post creation date?
- Changing the post date and time with function
- Custom Post Types, slug, archive and SEO plugins
- 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
- How to display an icon when a new post is published and then remove it when a specific time past?
- How to output comments number of a post per day?
- 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?
- Can wordpress differentiate between added and updated posts?
- Fetch posts from current week (Sunday to Saturday)
- WordPress theme ajax have_posts()
- wp_query if have posts show date but not in loop
- Retrieving posts by their date and category
- 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
- Getting an extra post’s meta data?
- Problem with articles feed: XML Parsing Error: XML or text declaration not at start of entity
- How do I allow certain users to make a certain type of post?
- Plotting posts on a graph
- 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
- Edit post & page option does not display on latest wordpress
- 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
- Google indexing duplicate page content with Page #### in post title and /page-2 in permalink instead of the ones I set
- 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?
- How do i search post by jquery datepicker?
- How to delete/customize imported demo content from a theme or add my own?
- 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?
- Can the_post_navigation() be outside of the loop?
- Compare date of user’s last posts
- Adding post date to ACF field
- Post URL duplication adds numerical value
- How can I set and update the the_date according to a custom field of the post
- Query post for today, if no post get the previous one
- 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?
- Save/retrieve form data best practises for theme development
- Latest Posts not in the right order
- How to organise post by category and date
- Display metabox with date
- Moving Posts to a new site and maintaining URLs
- wordpress taxonomy results
- How do I get the WordPress post to display the content instead of an image?
- post content includes and seo vs. duplicate content
- 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
- How to display a certain template element only for posts published within certain time range?
- Automatically delete default posts and pages on theme install?
- Extra Theme – Fit image inside of Featured Post Slider
- Permalink remain the same on each page
- the_time() cannot be placed correctly
- Is there a maximum amount of pages for a multi-page post?
- Is there any SEO impacts on unattached vs attached images for a post in WordPress?
- Password protection doesn’t prompt for password on pages
- How do I make it so that WordPress displays the post as a heading, followed by a written excerpt?
- 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 to set something to added automatically to the post
- How can I create Woodmart theme “linked variations” through REST API?
- Show posts assigned to multiple categories in current category page
- How to get orders that contains a product by date?
- Blog page shows the whole blog post instead of the excerpt or summary with the feature image only
- Is it possible to create dynamic templates for block themes directly from the site editor?