Site logo

Archived topic

Change position of meta-information (on home-page)

19 replies · Started by Edin on December 20, 2017

Viewing posts 1–15 of 20

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.

Screenshot

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:

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?

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.

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?

Screenshot

Thanks again,
Edin

Try this CSS:

.cat-links, .comments-link {
    display: inline-block;
}

Hey Leo,

Check this is what I have:

https://imgur.com/q0ffKpy

So the category needs to come on top of the title.

Cheers
L

This archived topic is closed to new replies.