How to get only present and past posts with post_date

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

Count time from registration date to today

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

Changing Date Format on Custom Meta Data w/shortcode call

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]’);

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)