How can i put “posted x minutes ago on my posts?

function k99_relative_time() { $post_date = get_the_time(‘U’); $delta = time() – $post_date; if ( $delta < 60 ) { echo ‘Less than a minute ago’; } elseif ($delta > 60 && $delta < 120){ echo ‘About a minute ago’; } elseif ($delta > 120 && $delta < (60*60)){ echo strval(round(($delta/60),0)), ‘ minutes ago’; } elseif ($delta … Read more

Change HTML Produced by wp_list_comments()

Here are some options on how we can override the native layout for each comment: Approach #1 – Overriding start_el() with a custom walker Let’s define our custom wpse comment format: // Arguments for wp_list_comments() $args = [ ‘style’ => ‘ol’, ‘format’ => ‘html5’, ‘short_ping’ => true, ]; // Use our custom walker if it’s … Read more

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