Archived topic
I can't change the position of the post_meta
5 replies · Started by Fabrizio on November 22, 2021
Hi,
I can't change the position of post_meta with Date and Author. I used the solution reported on this topic:
https://generatepress.com/forums/topic/how-to-place-the-post-date-above-the-post-header/#post-1964693
But it displays the post_meta 2 times, as following screenshot
https://prnt.sc/20heemt
Thanks
Fabrizio
Hi there,
remove your current PHP Snippet - and apply the one provided here:
https://docs.generatepress.com/article/generate_footer_entry_meta_items/#example
Then in Customizer > Layout > Blog --> Single (tab) - uncheck the Display Post Date
I'm sorry but it still doesn't work. Applying the snippet you indicated will appear 2 more times. If I disable date and author in the theme customizations, it is no longer displayed anywhere.
Hi Fabrizio,
Can you try this snippet and keep the customizer dateoption checked:
add_filter( 'generate_footer_entry_meta_items', function() {
return array(
'categories',
'comments-link',
'post-navigation',
'date'
);
} );
add_filter( 'generate_header_entry_meta_items', function( $items ) {
return array_diff( $items, array( 'date' ) );
} );
Let me know :)
Perfect! that's fine.
Thanks
No problem :)