Prints the publish date, and optionally the date when the post was modified as well
$post_id. If we are using this function inside our custom loops. We need to pass the ID of the post. Optional, Type: INT or false, Default: false.
$with_last_updated. Whether we should also print the last updated date. Optional, Type: boolean, Default: false.
The format of the date that we use is the one that we can set under
In a scenario where we are using this function from inside a custom get_posts loop, we need to provide
$post_id as the first argument.
When used from inside the main WP loop, we don’t need to provide it.