About Time conditionals

Here is how it works for me with minor changes:

  global $post;
  $post_created = strtotime($post->post_date);
  $sixMonthsAgo = strtotime('-6 months');
  $human_time="hace ". human_time_diff( get_the_time('U'), current_time('timestamp') );
  $mobile = wp_is_mobile();

  if ($post_created > $sixMonthsAgo && $mobile) {
   the_time('j. M .Y');

 } elseif( $post_created > $sixMonthsAgo && !$mobile) {
   the_time('j. F .Y');

 } else {
   echo $human_time;

 }

I hope this simplification helps 🙂

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