How To Display Last Updated Date In WordPress Posts

In many cases we need to display Updated date instead of the published date, where the articles updated regularly.

Display The Last Updated Date

To display the updated date in WordPress posts you will need to put the code shown below to your functions.php file in child theme.

add_filter('get_the_date', function( $the_time, $d, $post ) { return get_the_modified_date( $d, $post ); }, 10, 3 );

For more amazing WordPress tutorials Click Here.

Comments

  • No comments yet.
  • Add a comment