-
AuthorPosts
-
April 1, 2014 at 2:32 am #28491
Hi,
I need to add a second menu where publishing the list of the categories under the top-menu. Is it possible? How can I do?
regardsApril 1, 2014 at 3:53 am #28500I’m interested in this too! A second horizontal menu beneath the navigation bar in the header would be sooo useful!
Cheers
SilviaApril 1, 2014 at 3:38 pm #28739Hi there,
X Theme doesn’t have a built in way to add additional navigation here. If you’re interested in coding this feature yourself, I can provide a bit of direction.
I would recommend changing the navbar template in this file: x/framework/views/global/_navbar.php
If you’re going to be making code changes, I’d advise that you setup a child theme. You can find our collection here: http://theme.co/x/member/child-themes/ Or you can create your own with this information: http://codex.wordpress.org/Child_Themes A child theme allows you to make code changes that won’t be overwritten when an X update is released.
I’d recommend reviewing the WordPress documentation on using menus in WordPress theme development. You can find this article here: http://codex.wordpress.org/Navigation_Menus
There are two important steps here.
1. Register the menu in your functions.php file. This gives you a new menu location to assign in Appearance > Menus. For this you would use .
2. Edit the template to output the menu. For this you would use:
April 4, 2014 at 11:20 am #29917Thanks so much, could you please repaste the links missed? Another question: in which file I have to place the code in order to publish the menu under the menu bar?
April 5, 2014 at 1:28 pm #30151Hi Again,
you will have to place the code in x/framework/views/global/_navbar.php file right below the following code
wp_nav_menu( array( 'theme_location' => 'primary', 'container' => false, 'menu_class' => 'x-nav sf-menu' ) );
If you’re done registering the new menu in your functions.php file and assigning the new menu location at Appearance->Menus, you will just need to duplicate the above code and modify theme_location and menu_class to call your new menu(http://codex.wordpress.org/Function_Reference/wp_nav_menu). Then you can use some CSS to style the menu class you have defined.
June 12, 2014 at 6:38 am #55488Thank you, I’ve succesfully added a new menu in the header. Could you please provide the Css to style it like the main menu? I’m using Renew stack (child theme)
June 13, 2014 at 5:06 am #55819Hey Mohsan,
Happy to hear that you made it, congrats.
To style it like the main menu, it would be easier to know which settings of Renew you are using(Renew 01, Renew 02, …) or share with us your website url. You can also try to open developer tools in chrome(command + i on a mac, control + i on a pc) and copy the menu related code(.x-nav, .x-navbar .x-nav>li, .x-navbar .x-nav>li>a).
Cheers.
June 19, 2014 at 5:31 am #58263This reply has been marked as private.June 19, 2014 at 10:09 pm #58654Hi Mohsan,
Placing that menu under header is not currently possible at your setup. You have place it under the slider in, please move it under the menu.
There was a blue line at your slider, should I just give you css for X slider instead?
Let me know.
June 20, 2014 at 12:05 am #58686Actualy, I was hoping to add it just under the main nav menu to have two menus, that look the same, but are divided by a blue line.
June 20, 2014 at 3:47 am #58715Figured it out, thank you very much for your help!
June 21, 2014 at 5:22 am #59148Hey Mohsan,
Congratulation for fixing that on your own. We are happy we were able to help you.
Cheers.
-
AuthorPosts