Site logo

Archived topic

Move post category into same line with post date - Mellow site

6 replies · Started by trung on December 30, 2018

Viewing posts 1–7 of 7

Hi GeneratePress,

I use Mellow in GP site library. Please support me several things:
- In blog post: change "by" before post author into "." (a dot, like in single post);
- Both in blog post and in single post:
+ remove folder icon before post category,
+ move post category into same line with post date and post author,
+ seperate post category and post date by "." (a dot, like seperate post date and post author)

Thank you.

I used {{post_terms.category}} in Posts Hero Element and resolved problems in Single post.

Please support me problem in Blog post:
+ remove folder icon before post category,
+ move post category into same line with post date and post author,
+ seperate post category and post date by “.” (a dot, like seperate post date and post author).

Thank you.

I need post category is first, then post date so I change your code into:

add_filter( 'generate_post_date_output', function( $date ) {
    $categories_list = get_the_category_list( ', ' );

    if ( $categories_list ) {
        echo $categories_list . ' • <span class="categories">' .  '</span>';
    }
	
	if ( is_singular() ) {
        return $date;
    }

    echo $date;

   
} );

I don't know if it is right, but the code works well.

Thank you, David.

Thats great. Glad you got it resolved.

Thank you, David.

You're welcome. Happy New Year

This archived topic is closed to new replies.