Site logo

Archived topic

Move category meta

19 replies · Started by epickenyan on February 18, 2019

Viewing posts 16–20 of 20

To remove the one on the bottom, you can disable categories in "Customize > Layout > Blog".

No problem!

Hi Tom. Or better yet, kindly suggest for me how to move the category next to the date in blog layout (except single posts and pages). http://prntscr.com/mpkc47

Try this:

add_filter( 'generate_post_date_output', function( $output ) {
    echo $output;

    if ( ! is_single() ) {
        $categories_list = get_the_category_list( ', ' );
    
        if ( $categories_list ) {
            echo '<span class="cat-links">' . $categories_list . '</span>';
        }
    }
} );

Then disable the category option in Customize > Layout > Blog.

That worked (added float: right).

Awesome :)

This archived topic is closed to new replies.