Navigation Menu is a theme feature introduced with Version 3.0. WordPress includes an easy to use mechanism for introducing customised navigation menus into a theme. In order to incorporate menu support into your theme, you need to add a few code segments to your theme files.

learn more… | top users | synonyms (4)

0
votes
2answers
5k views

3 Level Deep Navigation Menu Not Showing All Levels

I have a 3 level deep navigation menu which will show beside all pages on the site except the homepage. The issue is only 2 of my 3 levels are showing in the menu when displaying it using the ...
0
votes
2answers
891 views

Conditional custom menu?

I'm trying to create a custom menu that displays a <li></li> when a user is logged in, and not display it when they're not. I have this so far, but it's not working. Does anyone know how ...
0
votes
2answers
847 views

How to add pages to custom menus on the fly [duplicate]

Possible Duplicate: Can I add pages to my custom menu via script? My theme has a custom menu called "Custom Header Menu" and i've got a plugin that sets up site defaults and creates my ...
4
votes
7answers
4k views

Large WP 3.0 menu times out and won't save

I have a large menu containing 10 parent items with roughly 7 child items each that I am trying to build using the WP-admin > Appearance > Menus. I have nearly all the menu items added but now my ...
3
votes
1answer
1k views

Custom wp_nav_menu output (displaying all child elements of top menu element in current branch)

I would like to create a walker function, or modify somehow current wp_nav_menus so it can produce a custom output. Let's imagine this structure: menu item 1 menu item 2 submenu item a submenu item ...
3
votes
2answers
992 views

Is it possible to add classes to list items in wp_nav_menu()?

I am using <?php wp_nav_menu( array( 'theme_location' => 'header-menu', 'menu_class' => 'nav-bar', 'container' => 'nav' ) ); ?> to output my ...
3
votes
4answers
4k views

remove last separator?

using; $args = array( 'menu' => 'mainmenu', 'container' => 'ul', 'menu_class' => 'span-10 clearfix', 'after'=>'/'); wp_nav_menu($args); which gives me; london/munich/artists/fairs & ...
2
votes
4answers
538 views

How to stop mobile theme inheriting desktop navigation menu?

UPDATE************ Well I have a working solution, although not ideal. Using the Genesis sandbox child theme which has a mobile nav button built-in, I was able to set that to use the primary nav ...
2
votes
2answers
824 views

Building a Sub-menu: Display Parent Category/Page's Children When Viewing Children

I would like a sub-menu in which the user visits a page, post, or category (in this example, "info") and is then displayed a list of children categories/pages. Not a dropdown menu, but a menu that ...
2
votes
1answer
1k views

How to change menu according to the language?

I want to change primary menu according to the language of the user. I have reviewed multi language plugins such as WPML and qTranslate. They have lots of features but what I want is much simpler than ...
2
votes
1answer
1k views

Assign Menus to Theme Locations with theme activation

A site is using "child1" named child theme. When this site switches to other child theme named "child2", their widgets are moving too but theme locations are not moving. How can i auto assign menus to ...
2
votes
1answer
986 views

Custom search filter causes menu and query_posts problems

I'm using a custom search filter (using my custom query var type), like so: function fteh_pre_get_posts( $query ){ if( isset( $query->query_vars['type'] ) ) $types = explode( ',', ...
2
votes
1answer
2k views

BuddyPress - How to add logout in nav menu

How to add a logout option to the main nav menu (not to the top bar) in BuddyPress?
2
votes
2answers
630 views

Organizing by super-categories (or nested categories)?

Suppose I want to blog about three somewhat unrelated main topics: Money, Languages, and Information-Technology on the same blog. How should I organize things for the best user experience? How does ...
1
vote
1answer
58 views

Is it possible to add a filter for the output of nav-menu items in admin?

I want to remove certain input fields on the admin screen for nav-menus for specific menu positions. I've used filters to filter front-end output but not for admin output. Is there a filter available ...
1
vote
1answer
62 views

Create a Page via plugin

My problem is to show a list of products read from db tables. I know how to read them and I am able to produce the table, but only using a shortcode embedded in a page that I've created via WP. I ...
1
vote
2answers
71 views

Create a select drop down of available menus

I'm attempting to create a custom field on my page creation that allows a user to choose which menu to display on the page. Right now I have my custom meta field setup, but can't figure out how to ...
1
vote
1answer
166 views

Hide pages depending on role

I've been trying to find a way to limit the user from seeing some pages in the "pages" menu in the admin panel. I looked in the edit.php file and noticed: } elseif ( 'page' == $post_type ) { ...
1
vote
1answer
1k views

wp_nav_menu - show children of current menu item only?

I am trying to create a menu structure with a simple concept: A horizontal, 1-level deep main menu A vertical submenu, that contains children of the current main menu item (2 levels deep) Of ...
1
vote
2answers
1k views

Nav menu items disappearing (but not immediately)

I'm working on a site where some of the nav menu items disappear (from the front end, the back end, and the database). However, debugging is extremely difficult since they don't disappear immediately! ...
1
vote
2answers
222 views

Select menu on browser resize

I have seen on some wordpress themes that if the browser width is less, the normal menu becomes a select menu. Can someone tell me how it is done? I know there is a plugin for that, but I want to ...
1
vote
2answers
1k views

Wordpress Menu Disappears when $query->query_vars['meta_key'] is set

I've set some meta variables on my WP posts. I want to be able to sort by these variables, and everything is working great except when I sort by either "views" or "likes". When I sort by either of ...
1
vote
2answers
2k views

Get parent page/menu id of current post

Basically, after setting up the initial "page for post" on the Reading Options, and then add that page to the menu I get the posts when I click on that menu item as expected. On there I know the post ...
1
vote
1answer
826 views

insert element inside wp menu list item

I am not sure if it is clear from the title what I want to achieve here so let me try to clarify this. I wanna make use of Wordpress's menu system and need to adjust it to my needs, which means that ...
1
vote
1answer
4k views

register_nav_menus() won't register menus

Please help with menu registeration: I have followed this guide (http://codex.wordpress.org/Navigation_Menus) step by step. Added the following code to functions.php: function register_my_menus() { ...
1
vote
1answer
1k views

jQuery Hoverintent plugin in TwentyEleven Menu [closed]

The default menu in the TwentyEleven theme is quite nice, pure CSS, but unfortunately, way too responsive and quick. It would be so nice to have it respond the same exact way with which the admin bar ...
1
vote
1answer
614 views

Bar separated navigation by extending Walker_Page

This question follows on from this one: Bar separated navigation by extending Walker_Nav_Menu I'm trying to do the same thing but this time I'm extending Walker_Page instead. The issue I'm having ...
1
vote
1answer
740 views

Change image based on menu item id

My client request to put header images, but the images must be unique based on what menu the click. Let say i have 2 menus. First is What is A and second is What is B. I can know the menu id when i ...
1
vote
2answers
4k views

How to add (css) classes to only one wp_nav_menu()?

Edit I removed the original Question as this Q has far above 1.000 views now - which means it's important to a lot of people - to show you something that works a) without a custom Walker & b) is ...
1
vote
1answer
469 views

How to specify or extend the CSS-class of a menu item?

is there a way to allow admin users to add classes to individual menu items in the back end? we have done some individual javascripting and CSS using the title tag, but that is not flexible as it is ...
0
votes
0answers
73 views

automatically adding submenu items

Here's the solution that @bainternet has posted here: Add child pages automatically to nav menu /** * auto_child_page_menu * * class to add top level page menu items all child pages on the fly * ...
0
votes
0answers
138 views

Keep active class in post page

I have one category and under this category I have many posts. Normally when I go to my category page from menu it added active class class="current-menu-item". Bellow is the rendered html <ul ...
0
votes
0answers
24 views

menu entries are lost

Suddenly I cannot add any menu entry via the "Menu" settings option (....wp-admin/nav-menus.php). Any new menu I set results in de-selecting the currently selected menu and saving a "null" menu ...
0
votes
1answer
754 views

Add class to all list items of wp_nav_menu

I have a wp_nav_menu to which I want to add a classes to the list items. I know this can be done by choosing 'css classes' from the screen options menu, but then I have to give every single li a ...
0
votes
0answers
85 views

Getting stripos error when trying to add menu classes

I'm using a custom theme that is doing something that blocks Custom Menu Classes (the optional ones that you can input from inside the Menu Panel) to print to HTML. I found in the code where they ...
0
votes
1answer
845 views

Custom menus created but does not show up in admin panel

I am developing a theme of my own. In functions.php I added - add_action( 'init', 'register_my_menus' ); function register_my_menus() { register_nav_menus( array( 'front_login_menu' ...
0
votes
1answer
243 views

How to display custom post meta in the appearance->menus page

I'm working on a website and added a custom meta option for all pages / posts called: "Location". $value = get_post_meta( $post->ID, '_privacy_location', true ); I'd like to add the value on ...
0
votes
3answers
413 views

Adding first and last class to Menu on top level only

I'm using a WordPress Menu to create a navigation structured like this: Home About Contact Sub Page Using this code from kuroi's response here I'm able to add first-menu-item and last-menu-item ...
0
votes
1answer
348 views

How to retrieve depth of menu into template

In wp_nav_menu i use for the menu, with custom walker, i can get the $depth parameter in the start_el function function start_el(&$output, $item, $depth, $args) but, outside this ...
0
votes
3answers
213 views

Move Sticky Nav Menu Below WordPress Tool bar when tool bar enabled

I've created a sticky menu but its hidden behind the WordPress Toolbar when logged in. How do i move it below the toolbar when enabled and logged in? I was looking for a conditional tag but couldn't ...
0
votes
0answers
594 views

collapse twenty twelve submenu in mobile version

in the twenty-twelve theme, the following code will collapse the sub-menu ul/li of the mobile version...the problem is that it also brake the normal version of the menu! how can i use it only when the ...
0
votes
1answer
668 views

Display all submenus

For a custom jquery menu I'd like to show all submenus and hide / show each on demand. However my problem is to show all submenus in the first place. As of now I am managing the first level through ...
0
votes
1answer
599 views

Nav Menu and display post count

Iam looking for a solution that the number of child post displayed, like so: Parent (14) - Child - Child Parent (2) - Child I have played with the custom walker and tried the function with ...
0
votes
3answers
4k views

How can I disable parent menu item links?

I don't want to have the parent menu items of my site's nav menus linking to a separate page. For one thing I don't want to have a superfluous page. For another these links hobble site navigation for ...
0
votes
1answer
1k views

Adding a unique class to wp_nav_menu

How would I go about adding a unique class to the direct child li elements of the main parent ul element generated with wp_nav_menu? <nav id="access" role="navigation"> <div ...
0
votes
1answer
652 views

Custom Menus Description Stripping HTML Tags

Spent two days researching this. I need to be able to add HTML to the Custom Menus Description. Everything I can find (including on this site) is from Feb 2011 and mentions using a strip_tags filter. ...
0
votes
1answer
600 views

How to create different menu's for not logged in visitors and for logged in members?

I'm creating a website which will provide services to members and I want to make it so that when a not logged in person comes to the website the menu is specifically designed for sales pages to make ...
0
votes
2answers
235 views

custom menu not found

I am trying to use a menu which I have partially working, I have setup functions.php: if (function_exists('register_nav_menu')) { register_nav_menu('main-menu', 'Main Menu'); } I have configured ...
0
votes
4answers
2k views

Hide menu items for visitors and filter based on role

In my menu i've got some menu items that i don't want to show to people who aren't logged in. One of these i only want to show to logged in users of a certain roles the other to everyone logged in. ...
0
votes
2answers
21k views

How to Create a Custom WordPress Navigation Menu with the Code?

Without using plugins, how to create a custom WordPress navigation menu with the code? I have Wordpress ver 3.2.1 and Buddypress ver 1.5.1 I would like to create a menu. I would like to place the ...