Archived topic
Change position of meta-information (on home-page)
19 replies · Started by Edin on December 20, 2017
Hello,
On the home-page where all the posts are listed:
I'd like to move the meta-information (in this case category and comments-count) directly below the article headline, and align them horizontally.
Is there a way to do that without affecting the location of the meta for the single articles?
Thank you!
Hi there,
You could try this:
add_action( 'after_setup_theme', 'tu_move_footer_entry_meta' );
function tu_move_footer_entry_meta() {
if ( ! is_singular() ) {
remove_action( 'generate_after_entry_content', 'generate_footer_meta' );
add_action( 'generate_after_entry_header', 'generate_footer_meta' );
}
}
Thanks, Tom, but now they disappeared completely (I've put the code into the functions.php btw.).
Here what I have ticked in the Customizer:
Hmm, can you link me to the page?
Tom, it's on a test-site behind a password. If you like I can send you the link and password per email?
You can use Account Issue here: https://generatepress.com/contact/
Thank you, just sent the email.
Weird that after title wasn't working - I adjusted it to after entry header and it's working now :)
This is what I was also looking for. And it works.
But I'm actually trying to get it before the title?
I tried before_entry_header and before_entry_title but both don't work.
Only after_entry_header works.
Try the before_content hook: http://demo.generatepress.com/hook-locations/
Hm, no this places it above my thumbnail. It really needs to be above my title because I have my thumbnail left aligned and the title and excerpt right aligned on my blog page.
But looking at the hook locations url there seems to be no hook to use before the page title.
Can you show me what you currently have again?
Tom, sorry for the late feedback, but thank you for making the change manually. It worked beautifully. I really appreciate your help.
Is there any way to put both metas horizontally?
Thanks again,
Edin
Try this CSS:
.cat-links, .comments-link {
display: inline-block;
}
Hey Leo,
Check this is what I have:
So the category needs to come on top of the title.
Cheers
L