By default, most post meta (date, author, etc) are displaying at top of single posts but the category to which the post belongs goes at the bottom of the post.
In order to group them all together on top, David provided this snippet that works just fine:
add_filter( 'generate_header_entry_meta_items', function( $items ) {
if ( is_single() ) {
$items = array(
'categories',
'date',
);
} return $items;
} );
The only thing is that it is not clear what “internet” means right in front of a date when you have a category called “Internet” for instance and I would like to add a plain text prefix, like “category: Internet” and then “publication date: xxx”.
Is there a way to add prefixes in plain text in front of 'categories'
and 'date'
above?