How to hide post published date?

Add entry-date { display: none; } to the stylesheet. Better create a child theme and add the code to the newly created stylesheet, if you dont you may lose the code when you update your theme to a latest version.

How to get Unix Local Time?

Please use DateTime::getTimestamp() that returns unix timestamp. If you want to format the date according to your time zone then you try this. $datetime = new DateTime(“now”, new DateTimeZone(‘America/New York’)); echo $datetime ->format(‘m/d/Y, H:i:s’);

Tumblr imported blog showing wrong date

Option 1 (no code): you can manually edit each post and change the published date. Look in the “Publish” box where you publish or update posts, and there will be a “published on” date with an “edit” link. Option 2 (requires database access): you can run a MySQL query to adjust all posts’ dates. UPDATE … Read more

Update existing post times to random times?

This is the part that is responsible for random date: //* Generate a random date between January 1st, 2015 and now $random_date = mt_rand( strtotime( ‘1 January 2015’ ), time() ); So you need to change it. And if you want to randomize only the time part, then this is one way to achieve that: … 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

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