Site logo

Archived topic

Post meta category - move location?

7 replies · Started by Alf on January 29, 2020

Viewing posts 1–8 of 8

Is there a way to move the post category meta up to the post date and post author? I.e underneath post title?
Thanks!

Great, thanks!

No problem :)

Just a follow-up,
I have added the suggested filter:

add_filter( 'generate_header_entry_meta_items', function() {
return array(
'categories',
'date',
'author',
);
} );

(adding it using Code Snippets). However, the category is still visible below the post (both on single post and archive frontpage. Is there a way to filter this location out?

And is it possible to add a "," between the category and post date?

Thanks again!

Hi there,

You can remove it from the footer like this:

add_filter( 'generate_footer_entry_meta_items', function( $items ) {
    return array_diff( $items, [ 'categories' ] );
} );

To add a comma, try this:

add_filter( 'generate_category_list_output', function( $output ) {
    return $output . ', ';
} );

Excellent, thank you!

You're welcome :)

This archived topic is closed to new replies.