Comparing two dates (ACF and current time)
Comparing two dates (ACF and current time)
Comparing two dates (ACF and current time)
WordPress Admin – Automatically Sort Custom Posts by Custom Field Date Value in d-m-Y Fomat
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
WP Query for all events prior to current date
$post_id = 12; echo get_the_date( ‘Y-m-d’,$post_id);
You need to pass a strtotime() compatible string or an array instead of ‘today’. You have several options… You could change ‘today’ to ‘now’. This will use the current time not midnight last night. You could change ‘today’ to ‘today + 1 day’. This will be the end of today. Not exactly what you are … Read more
Multiple orderby date arguments
Just gave an example of how to do it: $today_date = new DateTime( date( ‘Y-m-d’, strtotime( ‘today’ ) ) ); $register_date = get_the_author_meta( ‘user_registered’, get_current_user_id() ); $registered = new DateTime( date( ‘Y-m-d’, strtotime( $register_date ) ) ); $interval_date = $today_date->diff( $registered ); if( $interval_date->days < 31 ) { echo ‘With us ‘ . $interval_date->format(‘%d days’); … Read more
Try with change line to date(‘d-m-Y’,strtotime($current_user->delivery_date)) ; function delivery_date( $atts ) { global $current_user, $user_login; get_currentuserinfo(); add_filter(‘widget_text’, ‘do_shortcode’); if ($user_login) return date(‘d-m-Y’,strtotime($current_user->delivery_date)) ; } add_shortcode( ‘delivery_date’, ‘delivery_date’ ); echo do_shortcode(‘[delivery_date]’);
the_sub_field() echoes out the sub field. Use get_sub_field() instead.