Just use date_i18n
in multiple places with PHP date
arguments just for what you need:
if ( $date = get_post_meta( $thepostid, '_sale_price_dates_to', true ) ) {
$sale_price_dates_to =
'<span class="m">' . date_i18n( 'M', $date ) . '</span> ' .
'<span class="d">' . date_i18n( 'j', $date ) . '</span> ' .
'<span class="y">' . date_i18n( 'Y', $date ) . '</span>';
} else {
$sale_price_dates_to = '';
}
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
- 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
- Display published time for today’s posts only
- 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?
- How do I use PHP to get the current year?
- R Programming Error in cov.wt(z) : ‘x’ must contain finite values only
- Get date of last update outside of loop
- WordPress Custom Query to show posts from last x years
- Date, Time, and Timezones
- Keeping post_date same as the pending post_date on privately publishing the post
- How to remove published date from RSS feed
- Date comparison : which date format?
- XML export posts from one single day
- Bulk edit post date in wordpress
- month name translation
- Remove “at” string from wordpress comment date
- Date query not inclusive despite parameter being true
- Unable to set right time in admin and frontend template
- Change date from 2015/02/23 to “1 min ago”
- Display post date as 04/26/2013
- display month in french in wordpress/php?
- Get date numerical and separate?
- Add a link to display posts with a specific tag within a date range
- How can I show many posts an author has per week?
- After wp_insert_post(), date_i18n() and date() outputs are adjusted to GMT
- Convert GMT time to local time in Gutenberg Block Editor
- Print last modified date only on posts
- Do multiple jobs on date change without WordPress cron job
- Separately formatting date elements
- Copyright: Get first and last date of post type
- Wrong date returned by get_the_time
- How replace post date with event date
- Conditional: IF post creation date is in the first half OR last half of the year [closed]
- Return date in French
- Change post date for testing purposes
- How to change the date and time in REST API for comments?
- Local Post Date in WordPress Admin Panel Tables
- Sort / display recent posts by publish date
- Month display in English but required in Swedish?
- Change News Story Layout Based on Date Range
- Update post date of page when Visitor access that page?
- Randomizing Post Links Outside of Loop – No Author or Date
- Media attachment date and post date
- date format of custom date variable
- Check if is Post or Comment
- changing type of date picker in contact form 7 date picker plugin
- If X Amount of Time Has Passed Since Post Was Published, Do Something
- How to set post date in post_type so that it’s same as latest post in category
- User set date and time from frontend doesn’t get stored into database
- Not work hide comments with future date
- Translate Post date (month) of china language
- I want to format my Post dates differently to other dates on my website
- How to display posts categori list by day wordpres
- get_the_date() returns english Year & Day when language is Arabic
- Compare ACF Date field to today or yesterday
- Tumblr imported blog showing wrong date
- Can’t add to time? [closed]
- How to hide post published date?
- Adding a number to a date
- Include post_date in search
- Issue with strtotime() and Meta Box date
- suffix title with “EXPIRED” when scheduled post has reached it’s published date
- Show post date on the page
- Post publish date [duplicate]
- Set Custom Date for Posts
- Posted date format not reflected
- check if a draft has been moved there from publish to draft
- Make datestamp for status updates show time
- Saving Revision of post meta key/value on each update_post_meta event
- Comment time is same as the post time
- Limit access to a page
- In my Website homepage I want to remove date which is written along author name [closed]
- Display the last date, regardless of articles
- get_the_date() return always UTC+0 [duplicate]
- Convert custom field date format to “WordPress default”