$post_date = get_the_date('d/m/Y');
$today = date('d/m/Y');
if ( $post_date == $today ) {
echo get_the_date('h:m');
} else {
echo get_the_date();
}
Related Posts:
- Unable to select an old date in wordpress
- How to get date for each post?
- Converting Unix timestamp to wordpress date
- Modify Date Format to German
- Serve visitor post time adjusted to their timezone
- Styling the date format with date_i18n
- Date and time format for UK in a custom post type [closed]
- What are the “U” and “G” time formats?
- date() returns incorrect value if used from WordPress theme, but correct otherwise
- How to get date using timezone saved in options? [duplicate]
- Set the publication date independent of the scheduled publication date
- Format Date for Manual Insertion into post
- Translate current_time
- convert time to WordPress user’s local time
- Show different time stamp based on time
- Can’t convert ACF datepicker value to DateTime oject – gives me a boolean
- Count time from registration date to today
- Update existing post times to random times?
- Timezone for Plugin
- How to get Unix Local Time?
- How to display Date and Time in Tamil Language?
- Get current week’s day and time outside the loop
- Use the_date with link
- automatic send email at custom time
- Change the date and time in wordpress
- How to second orderby in “pre_get_posts” by meta value or combine single date and time to timestamp
- Advanced Custom Fields and date picker, show posts only if the day is today no matter the year
- Get system timestamp in wordpress
- How to customize Date Format for American visitors?
- Java SimpleDateFormat for YYYY-MM-DDThh:mm:ssTZD
- Convert a Unix timestamp to time in JavaScript
- Convert number to month name in PHP
- Post doesn’t show date if there’s another post with the same date
- The purpose of the post_date_gmt?
- Why my uploaded picture was loaded into /uploads/2015/02 not /uploads/2016/01?
- How to integrate get_post_time with date_i18n function?
- Permitting WordPress to accept dates outside of 1902-2038
- How to show the real post date in a draft
- How to display date such “x ago”
- How to remove published date from RSS feed
- Date comparison : which date format?
- Automatically move pending posts after 30 days and, update the post date, when users update the posts
- Count days from registration date to today
- WordPress returns a wrong date
- How to add 2 hours to the wordpress time formed with current_time(“mysql”, false)?
- WordPress post dating – pre 1901?
- Use meta_query to display events by date in custom field
- the_modified_date returns published date
- Change date from 2015/02/23 to “1 min ago”
- Display page only if user registered before a specific date
- Calculate future date
- Advanced custom fields: Customise date picker’s start date (need to choose year 1500 onwards) [closed]
- wordpress convert timestamp to date not correctly
- Show post updated date instead of published
- If modified on same day, show only time
- Convert GMT time to local time in Gutenberg Block Editor
- Mini app that shows one unique quote each day. 56 rotating posts rotating for each themed weekday. It works, but I need your advice
- How to add a sortable date column in an admin page?
- Events are all showing the current date
- Escaping date string in url with wordpress
- Separately formatting date elements
- Is there anything special I have to think of when setting post_date_gmt when inserting a new post?
- Are there any know limitations on the date field, especially how old dates can be?
- Return date in French
- Changing default WP-Site creation date
- How can I compare publish and update dates for a single post?
- Bulk Updating Post Date in 1 day Increments
- How to get User Time Zone in WordPress?
- Display Author Registration Date
- How display modified date of most recent modified post in wordpress?
- Date Language doesn’t change
- display future posts in date page
- how to show date of latest post in wordpress site?
- Month display in English but required in Swedish?
- Date is wrong on ‘all posts’ page
- Update post date of page when Visitor access that page?
- Switch Categories on a Specific Date?
- Get date function not working
- wordpress built-in Jalali date convertor
- If Post Published Date or Modified Date is 1 Year or Older, Display Notice on Post Page
- Is it possible to change X Hours Ago to date in WP Admin?
- Display Current Date using shortcode
- Check if is Post or Comment
- Create a date archives template page for custom post type
- Get current user last post date
- WordPress wrong dates bug
- How to add published date in product [closed]
- How do you update post date (year only) in a separate custom field?
- How to hide post published date?
- Notify after 3,6,9 and then 12 months after plugin activation
- Display Year and Month from custom field + Age Calculator
- suffix title with “EXPIRED” when scheduled post has reached it’s published date
- Display ‘modified date’ in WordPress Twenty Fourteen
- Set Custom Date for Posts
- Date comparison : which date format?
- Comment time is same as the post time
- Use esc_attr() to print month name in French
- Retrieve current and localized month
- wp_date doesn’t work
- How to get the date of all blog posts