Where is wp nav menu wordpress




















JunM JunM 6, 7 7 gold badges 31 31 silver badges 53 53 bronze badges. This is what I created in BEM notation stackoverflow. You will want to make sure that you've set up a custom menu selecting the menu location as top menu. The default Wordpress menu will not work and you will get the problem you're having.

Add a comment. Active Oldest Votes. Improve this answer. It seems it doesn't work. My parameter in my post is the only parameter I specified.

Do you have menus defined in your wordpress dashboard? Nope, just the default one. It seems it is still the same. Try to create a menu and then use the menu parameter. Look on my way stackoverflow.

Brane Brane 2, 2 2 gold badges 35 35 silver badges 52 52 bronze badges. Update: this was caused by the fact that i didn't have a menu created in the menu page. Sample Page.

Brane 2, 2 2 gold badges 35 35 silver badges 52 52 bronze badges. Accepts 'preserve' or 'discard'. Default 'preserve'. False if there are no items or no menu was found.

The following classes are applied to menu items, i. This example would cause a menu to show for logged-in users and a different menu for users not logged-in. Expand full source code Collapse full source code. This example will remove the unordered list wrap around the list items. This custom walker function will add several conditional classes to your nav menu i. Credit: Salcode. For these times you may want to show your own, placeholder, menu until that menu is set up.

By default, menus are encased with a div container. The options on this page show this parameter as a string to change the element used to contain the menu. However, it is not noted here that if you pass false as a value, the container is completely removed leaving just the ul menu element.

However, for the most uses, default two tags are most logical. This example would let you add a custom class to a menu item based on the condition you specify. The only accepted values for the container argument, by default, are div and nav so any other value will cause it to not display. This example will allows you to add the word of your choice to the beginning of your menu as a list item.

You were right to be confused: the arguments were in fact switched in terms of documentation. Improve this answer. If it wroked and answered your question, please, mark the answer as accepted. Chtiwi Malek Chtiwi Malek 1 1 bronze badge. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Explaining the semiconductor shortage, and how it might end.

Does ES6 make JavaScript frameworks obsolete? Featured on Meta.



0コメント

  • 1000 / 1000