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)

2
votes
1answer
749 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
911 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
2answers
835 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 ...
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
615 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
52 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
62 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
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
940 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
208 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
1k 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
757 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
3k 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
531 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
714 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
468 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
32 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
77 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
3answers
540 views

Adding Additional Menus In Genesis Child Themes

I have a Genesis child theme that I bought, and it only supports two menus, a primary and a secondary. However, for what I would like to do with my site I need to have 6 menus all together. This is ...
0
votes
1answer
195 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
75 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
484 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
188 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
320 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
132 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 ) { ...
0
votes
1answer
272 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
155 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
453 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
555 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
454 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
3k 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
516 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
2answers
4k 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
1answer
571 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
227 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
1k 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
18k 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 ...
0
votes
2answers
2k views

How to show only parents subpages of current page item in vertical menu?

I just can't find a way to make it possible to show only current parent items down to current page item in a vertical menu the "wordpress way". What I want to achieve is the following dynamic ...
0
votes
1answer
88 views

Styling child custom menu pages

I have a custom menu created using Appearance > Menus which contains top level and child pages. I would like to be able to indent my child level pages to give some sort of visual hierarchy to the ...
0
votes
4answers
1k views

How can I remove a menu item programmatically?

I'm using the built in menu manager to create my menues and I disaply them by using wp_nav_menu(). I'm wondering, is it possible to remove certain menu items from being displayed based on some ...
0
votes
1answer
663 views

Dynamic User State & City selection

I need to implement a state-city selection for my users to choose from. Where they first choose their state and then there is a city drop down field that shows only the cities in that state. ...
0
votes
2answers
787 views

Add a “has-children” class to body tag?

I need to add a "has-children" class to the tag if the current page's or post's menu item in fact has children. As this "logic" has to work with Pages, Posts, Categories etc. menu items it seems it ...
-1
votes
2answers
841 views

Auto add pages to category menu

I have created a custom post type called Products, on the product pages i have a menu in the left sidebar. This menu is made up of categories for the products. Is it possible to have my products ...