Hi, I'm new to Beans and have been trying to move the primary menu to the area before the header. So far I have not been able to a) find the name of the primary menu and b) find out how to move it to the place I want. That's what I did so far, but without result:
// Reposition main menu. remove_action( 'beans_header', 'beans_primary' ); add_action( 'beans_header_before_markup', 'beans_primary' );
Any help is highly appreciated!
I figured it out. Thanks to Mariusz Wachowski I am starting to understand it better now.
Hi Karen, I couldn't quite find where you found your answer, but I usually use
beans_replace_action( 'beans_primary_menu' , 'beans_header_before_markup' );
For future reference I found it easier if an answer was within the comments.
Hi Didou Schol, your anwser is totally correct.
I would suggest you to use
beans_modify_action() instead, the only difference is because this will keep original values in case you want to reset them again using
beans_replace_action() will replace original values. The
beans_reset_action() now will get the replaced values instead of original ones.
Hi, I'd like to move the menu above the header as well, but which file am I editing with above code?
Add the code directly to the child theme functions.php file.
Here is also some more information: https://wpbeansframework.com/2016/12/04/adding-a-new-menu/