[Resolved] Help with header hooks for 2 different headers (navigation)

Home Forums Support [Resolved] Help with header hooks for 2 different headers (navigation)

Home Forums Support Help with header hooks for 2 different headers (navigation)

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #620664
    jennifer

    Hi!

    I want to display a header/navigation on the homepage and a different header/navigation on all interior pages. I’m trying the following in hooks under “before header” but it doesn’t seem to be working:

    <?php if ( is_page() && ! is_page( array( 6595 ) ) ) : ?>
    [elementor-template id=”7166β€³]
    <?php endif; ?>

    <?php if ( is_page( array( 5982 ) ) ) : ?>
    [elementor-template id=”7038β€³]
    <?php endif; ?>

    I don’t have all of my page IDs set up for the 7166 template yet (which is the interior header and was created in the header/footer template plugin) as I’m still testing it out.

    #620699
    David
    Staff
    Customer Support

    Hi there,

    let’s try echoing the shortcode like so – just update your conditional and the shortcode ID:

    <?php if ( is_page( array( 5982 ) ) ) : ?>
        <?php echo do_shortcode( '[elementor-template id="XXX"]' ); ?>
    <?php endif; ?>

    You may also be interested in checking out GPP 1.7 in Beta which makes this super, no code, simple:

    https://generatepress.com/gp-premium-1-7/

    #621335
    jennifer

    That worked…thanks so much! Looking forward to the new release!

    #621341
    jennifer

    Oops! Spoke too soon!

    It worked, but it’s showing the 2 headers on the page now instead of one: https://havdev.26point2designs.com/about-us/

    Thanks!

    #621498
    David
    Staff
    Customer Support

    Hi there, you have a menu in the Top bar widget, that needs removing. And remove the logo from the Site Identity in the customiser, and then reduce the header padding to zero in Customiser > Layout > Header

    #622420
    jennifer

    I’m still doing something wrong:
    1) Created a header template (in header/footer template option)
    2) Created an interior header template (same as above)
    3) Assigned my hooks
    4) Still seeing double headers on the following page: https://havdev.26point2designs.com/board-members-and-staff/

    Thanks

    #622448
    David
    Staff
    Customer Support

    I am a little confused. So on that page (Point 4) i can see the Elementor template 7166. Followed by what i assume is the template you have created using the Elementor Header/Footer option.

    Why would you need both?

    #622937
    jennifer

    That’s what I’m trying to figure out! πŸ™‚

    On this page: https://havdev.26point2designs.com/board-members-and-staff/
    it should only have the header that is showing at the top, but it’s showing the homepage header as well. I don’t want the homepage header to show on interior pages.

    I have a homepage header (7210) and an interior header (7166) created using the header/footer builder (header/footer elementor plugin).

    Totally baffled.

    #622951
    David
    Staff
    Customer Support

    I would assume that when you built the header / footer template in Elementor when you published it you set the Display Condtions to Entire Site (?).
    You can set additional conditions which can Exclude. If you go to My Templates > Header and edit the template, then click the up arrow to the right of the update button you can edit the Display conditions.

    Let me know.

    #623207
    jennifer

    Ahhh! I feel like an idiot…I’ve not used Elementor templates (built in) before. I’ve always (tried!) to use the Header/Footer template plugin but not really had success with it. The only real thing I like with that plugin is the ability to add images, etc. behind the navigation without having to set negative margins.

    So…that worked. I appreciate your patience with me. πŸ™‚

    #623493
    David
    Staff
    Customer Support

    Not a problem at all, glad you got it resolved.

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