[Support request] Move Entry-header above content and sidebar

Home Forums Support [Support request] Move Entry-header above content and sidebar

Home Forums Support Move Entry-header above content and sidebar

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #684520
    easiii

    Hello,
    I would like to know if possible, what code do I need to add the function.php to move the entry-header (title & meta) above the sidebar & content. I’ve bought generatepress premium however I don’t want to use neither GP Hooks or Page Header to do this. I just want the code that needs to be added in the function.php. Thank you!

    #684692
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Using the Elements module is definitely the best way to do this.

    If you’re not interested in doing that for some reason, you could try this:

    add_filter( 'generate_show_title', '__return_true' );
    remove_action( 'generate_after_entry_title', 'generate_post_meta' );
    add_action( 'generate_before_main_content', 'generate_post_meta', 15 );
    
    add_action( 'generate_before_main_content', function() {
        the_title( '<h1 class="entry-title" itemprop="headline">', '</h1>' );
    } );
    #684717
    easiii

    Thank you, Tom!
    If we were to use the Elements add-on – is there any guide we can follow to do this?

    #685221
    Tom
    Lead Developer
    Lead Developer

    If you were to use Elements, you’d add a new “Header” element.

    Then you’d add the post title, date, author etc.. to the Page Hero content area using the template tags (seen in the right sidebar).

    This might help: https://docs.generatepress.com/article/header-element-overview/

    Let me know if you need more info 🙂

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