Skip to content

Instantly share code, notes, and snippets.

@gmmedia
Last active March 11, 2023 10:07
Show Gist options
  • Save gmmedia/a969070af8f7fddc8012a277382a5722 to your computer and use it in GitHub Desktop.
Save gmmedia/a969070af8f7fddc8012a277382a5722 to your computer and use it in GitHub Desktop.
Astra Theme: Display only last modified date in the post metadata.
<?php
/**
* Astra Theme: Display only last modified date in the post metadata.
*
*/
function j0e_post_date( $output ) {
$output = '';
$format = apply_filters( 'astra_post_date_format', '' );
$modified_date = esc_html( get_the_modified_date( $format ) );
$modified_on = sprintf(
esc_html( '%s' ),
$modified_date
);
$output .= '';
$output .= ' ' . $modified_on . '';
$output .= '';
return $output;
}
add_filter( 'astra_post_date', 'j0e_post_date' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment