Site logo

Archived topic

Move post-meta above title

20 replies · Started by LoGP on December 26, 2017

Viewing posts 1–15 of 21

Hi there,

1) What about adding this CSS:

.entry-meta {
    padding-left: 233px;
}

2) Try this:

.cat-links:before {
    display: none;
}

1) This moves the post-meta above the title, but also above the thumbnail. The post-meta should align with on the same height as the thumbnail. Also on mobile it doesn't look right.

2) Works thanks.

Cheers
L

Hey Leo,

Yup, tried it but didn't work.

This is the snippet I use:

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_before_entry_title', 'generate_footer_meta' );
}
}

Do you only want that on the main blog page?

If so give this a shot:

add_action( ‘after_setup_theme’, ‘tu_move_footer_entry_meta’ );
function tu_move_footer_entry_meta() {
if ( is_home() ) {
remove_action( ‘generate_after_entry_content’, ‘generate_footer_meta’ );
add_action( ‘generate_before_entry_title’, ‘generate_footer_meta’ );
}
}

Having the same issue, if putting conditional tag and hook 'after_setup_theme' it doesn't work. But without conditional tag it works.

Try change 'after_setup_theme' to 'wp' if using conditional tag and it works for me.

Awesome :)

@Leo, the code you provided also didn't do it.

@Akhmed, sorry I don't really understand. What do I have to do exactly?

Thanks
L

Try this:

add_action( 'wp', 'tu_move_footer_entry_meta' );
function tu_move_footer_entry_meta() {
    if ( is_home() ) {
        remove_action( 'generate_after_entry_content', 'generate_footer_meta' );
        add_action( 'generate_before_entry_title', 'generate_footer_meta' );
    }
}

Now the category shows up below my excerpt?

Hmm that's not what that code should do.

Without the code above, where does the category show up? The same place?

Hey,

I removed the code. The category indeed shows up in the same place.

Cheers
L

Hey Leo,

Already tried that code. Tried it again. Still doesn't work.

I started playing around and found something weird.

The category shows up in the correct place (above the title) when I also activate the Post Date in Layout > Blog > Archive. When I uncheck Post Date, the Post Category also disappears.

I could check both Post Date and Post Category and then hide the Post Date with CSS. But that seems like an improper work-around. Because in my case the post date should be removed. Not hidden.

What can I do next?

Cheers
L

PS. The more I work with GP, the more I like it. I'm coming from Genesis, which I still really like. I feel that if you keep adding more customization options in GP, it can become big...

PPS. You should integrate your WP Show Posts plugin with GP :)

This archived topic is closed to new replies.