Archived topic
Move date in posts
5 replies · Started by auerbach on December 16, 2020
I'd like to move the date displayed in posts to a less prominent position -- to the right side, or to the bottom of the post. I've seen a suggestion here to use a lengthy PHP script, but I'd rather avoid that.
Hi there,
You can move it to the bottom of the post like this:
add_filter( 'generate_header_entry_meta_items', function( $items ) {
return array_diff( $items, array( 'date' ) );
} );
add_filter( 'generate_footer_entry_meta_items', function( $items ) {
$items[] = 'date';
return $items;
} );
Let me know if that does the trick or not :)
Hi Tom. Thanks for the quick response, but unfortunately that had no effect when pasted in to Additional CSS in Customizer.
Hi,
Hi Tom. Thanks for the quick response, but unfortunately that had no effect when pasted in to Additional CSS in Customizer.
The code Tom posted is a PHP Snippet.
To make it work, Here's how to add PHP snippets -
https://docs.generatepress.com/article/adding-php/
Elvin - Thanks for that! Using it as a snippet worked.
I do wish GeneratePress had more built-in customization options, but I guess that would add to the theme's bulk and slow it down.
I appreciate your and Tom's help.
I do wish GeneratePress had more built-in customization options, but I guess that would add to the theme’s bulk and slow it down.
That's true. This is actually a known drawback with some page builders.
We're glad it works for you. No problem.