Archived topic
All Meta In One Single Line Part 2
11 replies · Started by Lars on April 3, 2020
I am using a function from May 14,2015 "All Meta In One Single Line", concerning how to get all the post meta data in single line below the post title. Support ticket: https://generatepress.com/forums/topic/all-meta-in-one-single-line/#post-108079.
The function works in Wordpress 5.2.4 but not in Wordpress 5.3.2 and later.
Can you check thats wrong and can you update the function please.
Lars Eriksson, Sweden
Hi there,
That function is very old.
Instead, use this filter: https://docs.generatepress.com/article/generate_header_entry_meta_items/
For example:
add_filter( 'generate_header_entry_meta_items', function() {
return array(
'date',
'author',
'categories',
'tags',
'comments-link',
);
} );
Let me know :)
Yes it functions. Shall I use the same code below to remove meta from the bottom of the page?:
footer.entry-meta {
display: none;
}
.cat-links, .tags-links, .comments-link {
display: inline-block;
margin-left: 10px;
}
See: https://generatepress.com/forums/topic/all-meta-in-one-single-line/#post-108079
Do this instead:
add_filter( 'generate_footer_entry_meta_items', '__return_false' );
Thanks! Works. I wonder wy I don´t get a "comments-link" ? Do you have any idee?
Hi there,
can you check if they appear on a post that has comments ?
Its a new site without comments. Is 'comments-link' the right kode?
Lars E
comments-link is the correct name.
Is the comment meta item enabled in Customize > Layout > Blog?
I cant se any "comment meta item" in the Customizer:

Is it enabled in the Archive tab?
I cant see anything about displaying "Comments", not in Single and not in Archive, only: Display read more as button, Display post date, Display post author, Display post categories, Display post tags, Display comment count, Use infinite scroll.
Lars E
The "Display comment count" is the one you want to check.