Archived topic
How to change the format of the Entry Meta - Author and Date
8 replies · Started by Paul on January 13, 2017
Hi There,
I would like to change the Entry Meta format from:
[Date] by [Name]
to
By [Name] | [Date]
Just wondering how to change it.
Thanks so much.
Hi Paul,
Adding this function should do it: https://gist.github.com/generatepress/5f7fd18cb77f13894223a8fe5bd74bc1
Adding PHP: https://docs.generatepress.com/article/adding-php/
Hi there,
Is there meanwhile a more recent workflow for this requirement?
Regards.
... with the new Post Meta Ordering?
add_filter( 'generate_header_entry_meta_items', function() {
return array(
'date',
'author',
'categories',
);
} );
Hi there,
yes the new post meta ordering makes this function much easier and is the best way to do it now.
Hi there,
Thank you, but how can I add the seperator in Filter ? :)
Date | Author | Category
That would need to done with CSS:
.cat-links, .posted-on {
border-left: 1px solid #000;
padding-left: 5px;
}
Adding CSS: https://docs.generatepress.com/article/adding-css/
Thank you. I used this CSS:
.author:before {
content: " | " !important;
}
That would work too :)