Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bibicadotnet/2bbc127fc1fc85a4dcfa3249df75de77 to your computer and use it in GitHub Desktop.
Save bibicadotnet/2bbc127fc1fc85a4dcfa3249df75de77 to your computer and use it in GitHub Desktop.
post and uptime date, view, comment GENERATEPRESS
/*
Plugin Name: post and uptime date, view, comment
Description: post and uptime date, view, comment GENERATEPRESS
*/
add_filter( 'generate_post_date_output', 'tu_show_modified_date' );
function tu_show_modified_date() {
printf( '<span class="posted-on"><i class="fa">&#xe800;&nbsp;</i>%1$s %3$s </span>',
esc_html( get_the_date() ),
esc_attr( get_the_time() ),
get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ? ' <i class="fa">&#xe804;&nbsp;</i>' . esc_html( get_the_modified_date() ) : ''
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment