Hi there,
You could use the generate_post_date_output filter to alter the output: https://docs.generatepress.com/article/generate_post_date_output/
add_filter( 'generate_post_date_output','tu_add_updated_date_output' );
function tu_add_updated_date_output( $output ) {
$time_string = 'Posted on: <time class="entry-date published" datetime="%1$s" itemprop="datePublished">%2$s</time>';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string .= ' Updated on: <time class="updated" datetime="%3$s" itemprop="dateModified">%4$s</time>';
}
$time_string = sprintf( $time_string,
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() )
);
return sprintf( '<span class="posted-on">%1$s</span>',
sprintf( '<a href="%1$s" title="%2$s" rel="bookmark">%3$s</a>',
esc_url( get_permalink() ),
esc_attr( get_the_time() ),
$time_string
)
);
}
Adding PHP: https://docs.generatepress.com/article/adding-php/
Then of course, make sure the updated time displays with some CSS (which it looks like you’ve already done):
.posted-on .updated {
display: inline;
}
Adding CSS: https://docs.generatepress.com/article/adding-css/