Archived topic
Header widget
8 replies · Started by David on November 23, 2020
Hi
How do I get the header widget to sit above the menu in the header...
http://185.20.51.60/~lkhrservicesco/
Thanks
Dave
Hi there,
simples option would be to remove the header widget and add the widgets to the Top bar, if needed we can then apply some CSS to move the widgets down over the site header.
I've moved to the top bar David, this them pushes the logo etc down.
What would be the best way to achieve this...
https://ibb.co/f97FYH6
So now we can move the Top Bar inside the inside navigation container using this PHP snippet:
add_action( 'after_setup_theme' , function() {
remove_action( 'generate_before_header' , 'generate_top_bar' , 5 );
add_action( 'generate_inside_navigation' , 'generate_top_bar' , 25 );
});
Adding PHP:
https://docs.generatepress.com/article/adding-php/
Then you will need this little bit of CSS to display the top bar over the menu:
.top-bar {
flex: 1 0 100%;
}
Sort of worked, but navigation is now sitting to the left
Also social icons are sitting underneath the phone number
I believe this is the solution you are after:
https://docs.generatepress.com/article/header-examples/#example-8
Let me know if this helps :)
Thanks Leo
No problem :)