[Resolved] Moving Entry Meta

Home Forums Support [Resolved] Moving Entry Meta

Home Forums Support Moving Entry Meta

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #573564
    John

    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.

    #573641
    Leo
    Staff
    Customer Support

    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.

    #573675
    John

    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.

    #573710
    Leo
    Staff
    Customer Support

    Think I see the problem.

    Can you try the edited snippet above?

    #573989
    John

    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?

    #574111
    Leo
    Staff
    Customer Support

    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;
    }
    #574204
    John

    kudos! that was helpful.

    #574245
    Leo
    Staff
    Customer Support

    No problem 🙂

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.