How display modified date of most recent modified post in wordpress?

This works for me. Place this in your functions.php file:

function prefix_last_modified_date() { 
  $last_modified_date = null;

  $args = array(
    'post_type'  => 'post', // could be page, or a CPT
    'orderby'    => 'modified',
    'post_count' => 1,
  );

  $last_modified = new WP_Query( $args );

  if ( $last_modified->have_posts() ) {
    $last_modified->the_post();
    $last_modified_date = get_the_modified_date();
  }

  wp_reset_postdata(); 

  return $last_modified_date;
} 

Then you can display the last modified post date anywhere in your theme:

echo prefix_last_modified_date();

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