Use esc_attr() to print month name in French

Here is my solution, which has been tested and works: // Timestamp to format (defaults to current time) $timestamp = time(); // Set language code $dateformat = new IntlDateFormatter( ‘fr_FR’, // Use valid Locale format IntlDateFormatter::LONG, IntlDateFormatter::NONE ); // Set date format $dateformat->setPattern(‘MMMM’); // Echo (and capitalize) formatted timestamp echo ucfirst( $dateformat->format( $timestamp ) ); … Read more

Advanced Custom Fields and date picker, show posts only if the day is today no matter the year

It’s a little complicated, but we can do this by directly modifying the query with a filter on posts_where. We’ll start with a query for posts with a meta value of today’s date, this is assuming a date format of yyyy-mm-dd: $date_today = date(‘Y-m-d’); $args = array( ‘posts_per_page’ => -1, ‘meta_query’ => array( array( ‘key’ … Read more

Date comparison : which date format?

The date format for entering the date is largely irrelevant. strtotime will convert a lot of different formats to UNIX time. Just make sure your input format makes sense to your users and make sure that your feed strtottime a format that correctly converts to UNIX time. If you are storing data in the *_postmeta … Read more

Make datestamp for status updates show time

Just go to Settings > General, scroll down to the date formatting section, select custom, and type this: F jS, g:i a which yields a date like: June 1st, 7:29 pm The official WordPress docs give the letters to use for time formatting.

check if a draft has been moved there from publish to draft

As far as I can see, you won’t get any indication a post was previously published, as wordpress remembers only the old versus new transitions. I recommend you add some meta data, that is use add_action(‘publish_post’, ‘your_function’) (or similar) to do update_post_meta($post->ID, ‘post_published’, ‘on’). That way, every post gets an indicator when it’s published – … Read more

Posted date format not reflected

I found a workaround by myself. In wp-content/themes/twentythirteen/function.php: function twentythirteen_entry_date( $echo = true ) { : //$date = sprintf( ‘<span class=”date”><a href=”https://wordpress.stackexchange.com/questions/112514/%1$s” title=”%2$s” rel=”bookmark”><time class=”entry-date” datetime=”%3$s”>%4$s</time></a></span>’, $date = sprintf( ‘<span class=”date”><a href=”https://wordpress.stackexchange.com/questions/112514/%1$s” title=”%2$s” rel=”bookmark”><time class=”entry-date” datetime=”%3$s”>%3$s</time></a></span>’, x %4$s o %3$s Still, it doesn’t seem to reflect the choice of the date-format setting made on wp.

Set Custom Date for Posts

Yes you can put custom date by editing the published on date on the top right of the post/page edit. See the image attached for better understanding.

How to second orderby in “pre_get_posts” by meta value or combine single date and time to timestamp

I’m outlining a solution for what you asked in your last comment, because this wouldn’t been fitting for the comment format. Code: function date_time_to_timestamp_meta( $post_id ) { // meta fields are saved in DATETIME, e.g. »2013-12-09 22:32:12« // here is only the date part relevant $datetime_date = get_post_meta( $post_id, ‘_start_date’, true ); // here is … Read more

error code: 523