[Resolved] Move post-meta above title

Home Forums Support Move post-meta above title

This topic contains 20 replies, has 4 voices, and was last updated by  Tom 8 months, 2 weeks ago.

Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
    Posts
  • #457229

    LoGP

    Hello,

    Continuing from this topic:
    https://generatepress.com/forums/topic/change-position-of-meta-information-on-home-page/

    1) How do I move the post-meta information above my title on the blog page? (I’ve tried your solution to use before_entry but that moves the post-meta above my thumbnail, see my website).

    2) How do I remove the category font awesome icon?

    Cheers
    L

    GeneratePress 2.0.1
    GP Premium 1.5.6
    #457333

    Leo Customer Support

    Hi there,

    1) What about adding this CSS:

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

    2) Try this:

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

    LoGP

    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

    #457489

    Leo Customer Support

    Hmm there should be a generate_before_entry_title hook. Tom used it here: https://generatepress.com/forums/topic/blog-category-above-title/#post-316793

    But you’ve tried it and didn’t work?

    #457627

    LoGP

    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’ );
    }
    }

    #457958

    Leo Customer Support

    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’ );
    }
    }
    #458349

    Akhmad

    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.

    #458508

    Leo Customer Support
    #458646

    LoGP

    @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

    #458835

    Leo Customer Support

    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' );
        }
    }
    #458870

    LoGP

    Now the category shows up below my excerpt?

    #459003

    Tom Lead Developer

    Hmm that’s not what that code should do.

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

    #459360

    LoGP

    Hey,

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

    Cheers
    L

    #459741

    Tom Lead Developer
    #459794

    LoGP

    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 🙂

Viewing 15 posts - 1 through 15 (of 21 total)

You must be logged in to reply to this topic.