Archived topic
Moving Entry Meta
7 replies · Started by John on May 11, 2018
What's the best way to move the entry meta (cat-links and post-navigation) to top of the blog page?
Buy the premium plugin if you're reading this page. It's awesome.
Hi there,
Give this snippet a shot:
add_action( 'wp', 'lh_move_footer_entry_meta' );
function lh_move_footer_entry_meta() {
if ( is_single() ) {
remove_action( 'generate_after_entry_content', 'generate_footer_meta' );
add_action( 'generate_before_main_content', 'generate_footer_meta' );
}
}
Adding PHP: https://docs.generatepress.com/article/adding-php/
Let me know.
It moved. I just don't know where it moved to! I'm using a header, so I'm not sure if that's the issue. I left the php running if you want to take a look and see what you think. Thanks again, Leo.
Think I see the problem.
Can you try the edited snippet above?
That worked! What did you change? I'm not seeing the edit. Where's Waldo? LOL. I know this may be easy but I'm having trouble with getting that top edge of the main container at the top to align with the sidebar. Sorry. How do you recommend changing that?
I changed where it hooks into from generate_before_entry_title to generate_before_main_content
Try this CSS:
footer.entry-meta {
margin-top: 0;
}
kudos! that was helpful.
No problem :)