Tagged: ,

This topic contains 3 replies, has 3 voices, and was last updated by  Skandha 6 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #170973

    npl_buzz19
    Participant

    Hi,

    I’m trying to add another menu bar to my site since the default NepalBuzz theme only supports 2 menu locations.

    I added this code snippet to my functions.php and it worked great:

    function register_my_menu() {
    register_nav_menu(‘new-menu’,__( ‘New Menu’ ));
    }
    add_action( ‘init’, ‘register_my_menu’ );

    Now the instructions say to add this code to the header.php page to place the menu where I want it:

    wp_nav_menu( array( ‘theme_location’ => ‘new-menu’ ) ); ?>

    However, I can’t get the menu bar to show up how I’d like. I want the new menu bar to be ABOVE the main sticky menu at the very top of my site. I tried adding the code snippet to the bottom of the header.php page, and it showed up at the top of the main container of my site. I tried adding it at various other points in the header.php file and it just caused errors.

    I know there’s another file in the NepalBuzz directory called menus.php. Is this where I should be adding this code snippet to place the menu where I want it? If so, where?

    Sorry, I am not well-versed in PHP. Thank you for any help!

    #171008

    sapana
    Participant

    @npl_buzz19: If you are making any changes in the theme I suggest you to make child theme as the changes you make in core files of the theme get lost after you update the theme. Let me know if you are familiar with child theme customization otherwise I suggest you to hire a customizer to get it done.

    Kind Regards,
    Sapana

    #171056

    npl_buzz19
    Participant

    Hi,

    Yes, I am using a child theme.

    • This reply was modified 6 months ago by  npl_buzz19.
    #171264

    Skandha
    Keymaster

    @npl_buzz19: Hello there,
    Go to => Child Theme Folder => functions.php and add the code in this link.

    Go to => Child Theme Folder => style.css and add the CSS Code in this link.

    Let me know if the new menu shows up in your customizer and is working well.
    Kind Regards,
    Skandha

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.