Show the_date with link

Try this: <?php $archive_year = get_the_time(‘Y’); $archive_month = get_the_time(‘m’); $archive_day = get_the_time(‘d’); ?> <a href=”https://wordpress.stackexchange.com/questions/201844/<?php echo get_day_link( $archive_year, $archive_month, $archive_day); ?>”><?php the_date(‘Y/m/d’); ?></a> HTML result: <a href=”http://example.com/2015/09/07″>2015/09/07</a>

Separately formatting date elements

I believe all the info you need is in the PHP Manual for Date/Time. Also, it is recommended that you use get_the_date(); instead of the_date(); Get them month in 3 cap letters? M is the right format character that outputs a short textual representation of a month (3 chars). Why can’t you use CSS to … Read more

Get WordPress current date/time

There is a function in WordPress called current_time(); which you pass either ‘timestamp’ or ‘mysql’ to and it returns a time. For more information: https://developer.wordpress.org/reference/functions/current_time/

UTC/local time in Worpdress

your post is very old, but in case someone gets the same issue. Even if your server is set to date_default_timezone_set(‘America/New_york’); When WordPress runs, it rewrite the config to date_default_timezone_set(‘UTC’) to store datetime in UTC, which is the Universal Time without offset. Usually, when I compare a date to now, I use the variable $_SERVER[‘REQUEST_TIME’]. … Read more

Timezone UTC to PST

WordPress always sets time zone to UTC and native PHP functions will report and operate that in its environment. To get local time (adjusted from UTC by WP’s timezone setting) you need to use WP’s functions, such as date_i18n() and others. It’s confusing, but it’s much less problematic to do it WP way, than try … Read more

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