Site logo

Archived topic

sticky top bar

5 replies · Started by Irmgard on December 8, 2022

Viewing posts 1–6 of 6

Hi there,
I do have a sticky header and want to get the top bar also sticky. Somehow I do not find the correct answer in the forum. Is this only possible with hooks or elements?
Thank you.

http://www.yogastudio-nanda.de

Hi there,

add this PHP Snippet to move top bar inside the navigation:


add_action('wp', function(){
    remove_action( 'generate_before_header', 'generate_top_bar', 5 );
    add_action( 'generate_inside_navigation', 'generate_top_bar', 1 );    
});

Hi David,

Thank you, but did not work. Somehow the top bar was shorten from left and from the right (margins). So I removed the code again.

Did i miss sth? I added the code to the functions.php of my child theme.

Thx.

Yeah it will need some extra work:

1. Add back the code.
2. In Customizer > Layout > Primary Navigation set the Inner Width to Full width
3. Let me know when that is done, and ill provide some CSS to re-align the nav menu width.

Hi David,

am I blind? I do not find in customizer - layout - primary navigation a setting for the inner width:
It looks following?

https://snipboard.io/cpQ284.jpg

Hope you can help. Thx.

Hi there,

In order to make the options show, can you go to customizer > layout > header, check the Use navigation as header option, then go to customzier > layout > primary navigation, you should be able to see the option.

Once full width is selected, go back to the header, and uncheck the Use navigation as header option.

This archived topic is closed to new replies.