Archived topic
Move post category into same line with post date - Mellow site
6 replies · Started by trung on December 30, 2018
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.
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
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