Archived topic
Remove "by" and move Published date to the end
7 replies · Started by Luong on February 20, 2020
I managed to show the author's avatar under each post title by following this topic: https://generatepress.com/forums/topic/displaying-the-author-avatar-on-top-of-the-post-modifying-this-code/
Now I want to
- remove the word "by" before the author's name
- move the published date to below the post instead of showing above
Thanks in advance.
Hi there,
- Try this snippet:
add_filter( 'generate_inside_post_meta_item_output', function( $output, $item ) {
if ( 'author' === $item ) {
return '';
}
return $output;
}, 50, 2 );
- Try this filter:
https://docs.generatepress.com/article/generate_footer_entry_meta_items/
Let me know if this helps :)
Now it shows the date in both locations.
Sorry you'd need this as well:
https://docs.generatepress.com/article/generate_header_entry_meta_items/
I added the code as well. It doesn't work, now it adds both date and category in the two places. https://goopaw.com/hello-world/
Did you make sure to modify the code to only keep the items you want?
Thank you a ton! I don't know I have to modify the code a bit. Now it works perfectly
No problem :)