Plug this PHP into your site:
add_filter( 'generate_header_entry_meta_items', function() {
return array(
'author',
'date',
);
} );
add_filter( 'author_link', function( $link, $author_id ) {
$url = get_the_author_meta( 'user_url', $author_id );
if ( $url ) {
$link = $url;
}
return $link;
}, 10, 2 );
add_filter( 'generate_post_author_output', function() {
return sprintf( '<span class="byline"><span class="author vcard" %5$s>%1$s <a class="url fn n" href="%2$s" title="%3$s" rel="author" itemprop="url"><span class="author-name" itemprop="name">%4$s</span></a></span></span> ',
__( 'Published by', 'generatepress' ),
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
/* translators: 1: Author name */
esc_attr( sprintf( __( 'View all posts by %s', 'generatepress' ), get_the_author() ) ),
esc_html( get_the_author() ),
generate_get_microdata( 'post-author' )
);
} );
add_filter( 'generate_post_date_output', function( $output, $time_string ) {
$time_string = '<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 = '<time class="entry-date updated-date" datetime="%3$s" itemprop="dateModified">%4$s</time>';
}
$time_string = sprintf( $time_string,
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date( 'F j, Y' ) ),
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date( 'F j, Y' ) )
);
return sprintf( '<span class="posted-on">Updated on %1$s at %2$s</span> ',
$time_string,
get_the_modified_time( 'g:i A' )
);
}, 10, 2 );
Then add this CSS:
.entry-header .entry-meta > span {
display: block;
}
That should give you that exact result 🙂