Site logo

Archived topic

Adding HTML to header on desktop next to hamburger

11 replies · Started by Andrew on July 10, 2021

Viewing posts 1–12 of 12

Hello, I've decided to start building my sites using your theme, I'm having a hard time figuring out how I can add the markup next to the menu, please see the link for example of the OLD site. I'm trying to replicate this same design in the header. Thanks in advance for any help!

https://aj4113.wpengine.com/

Hi there,

you can use a Hook Element to add the HTML, or a Block Element if you want to use the Block Editor to add content to the them templates

In either of those elements you cans select a Hook to place your content, use the generate_menu_bar_items hook to add content beside the hamburger.

And set the Elements Display Rules Location to Entire Site ( or the parts of the site you want it displayed ).

Its beside it - you just need to change the text and background colors in Customizer > Colors > Primary Navigation.
And increase the Font Size in Customizer > Typography > Primary Navigation.

For your HTML - i would do this:

<div class="menu-bar-cta"><span>CALL OR TEXT</span><a href="tel:248-644-2136">248-644-2136</a></div>

Then add some CSS to style it:

.menu-bar-cta {
    display: flex;
    align-items: center;  
}
.menu-bar-cta span {
    font-size: 16px;
    margin-right: 10px;
}
.main-navigation .menu-bar-cta a {
    font-size: 30px;
}

In the Customizer > Colors > Primary Navigation you can set the Background color to transparent ( or the same blues as your site header ) and the Text color to white - that should give you the result you require.

Thanks David, that worked great. One more question, is it possible to have a search icon as well to the right of the menu?

For sure - in Customizer > Layout > Primary Navigation - just enable the Navigation Search

Aweomse thank you, is it possible to display to the right vs the left? Lastly is that the only style option that's provided or can you have it open up a full screen overlay?

Your the man! Works great. I believe I have almost all the same functionality as of now.
Is it possible to add an image in the off canvas menu above the navigation, such as on the link below
https://aj4113.wpengine.com/

Also I know I can hook in right below the header but I was curios as how I could add a search box to it similar
to link below

https://mismile.com/meet-the-doctor/

This archived topic is closed to new replies.