Skip to content

Instantly share code, notes, and snippets.

@gmmedia

gmmedia/functions.php

Last active Aug 14, 2020
Embed
What would you like to do?
Astra Theme: Display only last modified date in the post metadata.
/**
* 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