Site logo

Archived topic

Help with header hooks for 2 different headers (navigation)

10 replies · Started by jennifer on July 10, 2018

Viewing posts 1–11 of 11

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.

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/

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

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

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

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?

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.

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.

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. :)

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

This archived topic is closed to new replies.