#25: the_modified_date

The the_modified_date filter allows you to modify the modified date output when used for a post inside the Loop.

It is evaluated in the the_modified_date() template tag in the wp-includes/general-template.php file. Template tags must be used inside the Loop.

the_modified_date accepts 4 arguments:

  1. string $the_modified_date The date the post was modified
  2. string $d The date format, if empty it defaults to the value of date_format option
  3. string $before What to output before the date
  4. string $after What to output after the date


The following wraps the modified date in emphasis tags on output.

View the code example on Gist.

Have a suggested improvement? You can fork the Gist and comment back with the link. If all is agreeable, I’ll merge in your changes. Crowd-sourced documentation FTW!

Leave a Reply

Your email address will not be published. Required fields are marked *