[Resolved] Move post category into same line with post date – Mellow site

Home Forums Support [Resolved] Move post category into same line with post date – Mellow site

Home Forums Support Move post category into same line with post date – Mellow site

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #768940
    trung

    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.

    #769036
    trung

    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.

    #769200
    David
    Staff
    Customer Support

    Hi there,

    remove the icon with this CSS:

    .cat-links:before {
        display: none;
    }

    And to place the category on the same line as date, Tom covers that here:

    https://generatepress.com/forums/topic/display-category-meta-next-to-date/#post-756796

    #769571
    trung

    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.

    #769745
    David
    Staff
    Customer Support

    Thats great. Glad you got it resolved.

    #770189
    trung

    Thank you, David.

    #770653
    David
    Staff
    Customer Support

    You’re welcome. Happy New Year

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.