Hello! I would like to swap the primary and secondary navigation bars so the secondary one is on top of the primary one. I know I could achieve this by simply switching their styles and contents, but I really like having the search bar on the primary navigation and having the primary navigation in “sticky” mode.
I tried the following code to swap them, using the “Code Snippets” plugin :
add_action( 'after_setup_theme','generate_move_secondary_nav' );
function generate_move_secondary_nav()
{
remove_action( 'generate_before_header', 'generate_add_secondary_navigation_before_header', 7 );
add_action( 'generate_before_header', 'generate_add_secondary_navigation_before_header', 4 );
}
The snippet definitely shows as “Active” and is set to “Run snippet everywhere”. I found this code as a suggested solution here : https://generatepress.com/forums/topic/secondary-navigation-2/ but it does not seem to have any effect on my Website. This thread is almost two years old so maybe something changed in the theme since then and this code is outdated? There is no custom CSS or added PHP code other than the snippet above.
Thank you and have a nice day!