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)

7
votes
2answers
5k views

Display Menu Name using wp_nav_menu

I have a custom menu that I can call just fine using wp_nav_menu. Is there a way to have the menu name displayed inside an h3 tag before the menu? Ex. <h3>My Menu Name</h3> <nav> ...
15
votes
4answers
9k views

Add 'has_children' class to parent li when modifying Walker_Nav_Menu

I'm writing a customised walker class for wp_nav_menu and want to be able to specify if an li contains a submenu. So I want my markup to be: <li class="has_children [other-wordpress-classes]"> ...
1
vote
1answer
131 views

custom walker nav issue involving ajax

I am using ajax in a theme not written by me. This ajax gets the link clicked and then slides that page into view. it works good. In order for it to do it's thing, I had to make a custom walker for ...
0
votes
1answer
89 views

Search form as list item in menu?

What is the best way to do this: <?php wp_nav_menu( array('menu'=>'Primary', 'container'=>'', 'items_wrap'=>'<ul id="%1$s" ...
1
vote
1answer
113 views

Main menu highlighting on subpage which is not in submenu but in hierarchy

I have my menu made of images. Therefore I use divs and with .current-menu-item I use CSS to change the image. This works if I'm directly on this main page. If I'm on a subpage I cannot use this trick ...
5
votes
5answers
1k views

Add separator to admin submenu

I would like to add a separator to the admin submenu section, NOT in the top level section. I'm thinking of using javascript and styling to do the job, but I was wondering if there's a more ...
0
votes
2answers
477 views

How can I add a delay to the collapsible menu in Twenty Eleven?

The navigation menu closes immediately upon moving the mouse outside of the menu item's area. How can I introduce a delay that will keep it open a second or less to keep visitors from becoming ...
1
vote
1answer
757 views

Container class not appearing on navigation menu

I want to render a menu with a container like this: <nav class="nav"> However, the container is just rendering with the default class name applied which I don't want. <nav ...
0
votes
2answers
104 views

Cannot seem to replace the native menu with the menu I created, so 2 menus appear

Helping a friend w/ a navigational menu on a WordPress PHP site -- called it Primary Menu. I'm trying to override the default navigational menu with the jquery-mega-menu I created in the widget area ...
20
votes
2answers
15k views

Customizing Only a Specific Menu using the “wp_nav_menu_items” Hook?

Thanks to some help on here, I've managed to add a custom search box to my main menu... by adding this to my theme's functions.php add_filter('wp_nav_menu_items','search_box_function'); function ...
0
votes
2answers
232 views

WP Nav menu append to url

Using wp_nav_menu() , how can I append a value at end of each URL? For example, I have the following url: http://www.example.com/ but I have to append a language parameter at the end, so the url ...
0
votes
1answer
712 views

How to develop a menu like wwe.com?

I would like to design and develop a WordPress menu like wwe.com's menu where it has multiple columns, images and a video section in drop down menus. I can create a multi-column menu, but I'm not ...
0
votes
2answers
77 views

WP Nav Menu: String replacements

I have a short function to clean up the WP Nav Menu. add_filter('nav_menu_css_class','strip_classes'); function strip_classes($a){ return (in_array('menu-item-71',$a))? array('contact') : ...
-1
votes
2answers
109 views

Wordpress menu links with images & class selection

<ul> <li class="selected">Link 1<img src="images/slash.png" /></li> <li>Link 2<img src="images/slash.png" /></li> <li>Link ...
2
votes
1answer
5k views

Bootstrap drop down menu with wp_nav_menu

I am trying to build a Wordpress theme with boostrap, but the nav menu is giving me some trouble. I would like the dropdown to work like boostraps dropdown, but I do not know how to do this. This is ...
-1
votes
1answer
367 views

Creating an accordion style menu

Is there any way to create a menu with dropdown list like the image below in WordPress ? click to enlarge ⤴ Here, when we click on [+] sign the dropdown menu shows up, I can manage the CSS, but ...
0
votes
1answer
286 views

How to change the menu color

I need to change the menu color of the wordpress 2011 theme to transparent. this is the header <nav id="access" role="navigation"> <h3 class="assistive-text"><?php _e( ...
0
votes
1answer
92 views

Can't remove menu items added by plugin

I am trying to remove menu items from the backend but for some reason I can't remove specific menu items added by plugins. For example, I can use this line to remove the plugins page and it works just ...
1
vote
1answer
494 views

Set default screen option for appearance -> menus

Is it possible to have any control over the screen options for Appearance>Menus. I am working on a theme and with a fresh Wordpress install where I had never touched any of the screen options ( at ...
0
votes
2answers
1k views

register_nav_menus, then create menus programatically

I have a register_nav_menus call in my theme's functions.php: //register nav menu and footer nav. register_nav_menus( array( 'main-nav' => 'Main Navigation', 'footer-nav' ...
1
vote
0answers
30 views

Adding custom menu widget to sidebar programatically [duplicate]

I am trying to add custom menu widget to the sidebar. I am not working on wordpress directly, but I am using an xml-rpc calls to manage worpdress site (it is possible via ...
-2
votes
1answer
483 views

Resolve the debugs

I enable the debugs, and i have these that describe below. In the wp-config.php write : define('WP_DEBUG', true); define('WP_DEBUG', false); 1) Notice: Undefined index: type in ...
3
votes
3answers
997 views

One site, 2 distinct sections: two different top nav menus?

I have a site that is in two distinct halves. I'd like the same template to apply to the whole site (from a look & feel perspective), but for each 'half' of the site to have its own top nav menu. ...
0
votes
2answers
376 views

Change class-name on “current_ancestor” in wp_nav_menu

Im working with a project where i want the wp_nav_menu to output other css classes for current_page, current_ancestor and remove other stuff like page-id and menu-id. I have get some stuff working ...
5
votes
1answer
468 views

How do I add nested categories to drop-down menu in twenty-eleven?

I know how to do it by writing a separate ul/li css for wp_list_categories, but I find menus of "twenty eleven" already well designed and flexible, so I`d like to use them. Custom menus, when I have ...
3
votes
2answers
1k views

Use wp_nav_menu() to display a Menu from another site in a Network install?

So I'm basically upgrading an older site and I need to make it multisite as well for some blogs and such. I'd like to have the main site Menu(created from the admin) available on the other sites in ...
0
votes
1answer
222 views

Removing Submenu from Menu

Thesis appears to automatically add the sub-menus (sub-menu ul) to menu parents if childs exists. I have a specific need to remove this html from a particular menu. The menu name is: second_level ...
0
votes
1answer
229 views

Recent Posts widget missing current_menu_item class

Unlike the (WP standard) Custom Menu widget, the Recent Posts widget does not add the current_menu_item class when a post is selected (being displayed). This seems like a major oversight, am I ...
1
vote
2answers
476 views

Get menu links only

I'm creating a template in HTML5. On navigatiom menu i need to implement something like this <nav> <a href="url1">url1</a> <a href="url1">url2</a> <a ...
1
vote
1answer
81 views

do_action appearing outside of menu?

I'm using Bill Erickson's "Add Extra Code to Any Menu" function: <?php /** * Add Extra Code to Any Menu * @author Bill Erickson * @link http://www.billerickson.net/customizing-wordpress-menus/ ...
1
vote
1answer
1k views

How to change theme header to support multiple nav menus?

I'll try to be brief.... I have a theme that only supports one navigation menu. At this point I'd like to add 2 or 3 more menus. I have successfully registered my menus in functions.php with ...
0
votes
1answer
308 views

Using CSS ID's and Classes with images in a Wordpress Horizontal Menu

just found this marvelous website, so, I'm new in Wordpress. I have a HTML/CSS website developed from a PSD file. Everything was going OK, Header, Footer, but when I came across the WP menu, I'm just ...
1
vote
1answer
184 views

list category posts under its item in menu

When adding category to Menu, I need it to list all the item that belong to that category in separate UL automatically. like this http://i.stack.imgur.com/ulOOS.jpg Of course I can do that manually, ...
0
votes
1answer
81 views

Dynamic Menu drops pages?

I've created a Dynamic Menu that highlights the selected page and colors for example the blog page "red" while the other links (home, about, contanct) remain white. My question is how can I make the ...
1
vote
0answers
86 views

Filter Menu Items by Custom User Role in a page

I want to create a page template where the contents of the menu is filtered. Say, on Template 1, I want only the pages/post created by a custom access role areamanager1 to be displayed on the Menu on ...
0
votes
1answer
49 views

Site with all content on the front page

I would like to achieve the following: all the content is displayed on 1 page (the front page) the content is organized in sections the content for each section can be edited separately each section ...
0
votes
1answer
432 views

Show menu based on parent & ancestor

Trying to show a wp menu based on parent. Works great on parent / child pages, but on grandchildren pages its failing. How should i restructure the menu selector to include the sub nav menu based on ...
1
vote
1answer
52 views

Find the Children of a Page then Echo it as a Bulleted List of Links (menu)

I am trying to check if a parent Page has children. If it has children I would like to echo the children as a bulleted list with links to each child (basically a menu). Right now I have the following ...
1
vote
2answers
2k views

How do I fix this error: Warning: invalid argument supplied for foreach()?

I recently moved a wordpress install from my local instance to a dev server. For the move, I installed a clean version of wordpress 3.4, moved exact duplicates of the file structre, and used the ...
0
votes
2answers
129 views

How to insert link to the default post archive into a menu

I can add categories, I can even add a custom post type archive, but I can't add the original posts archive. It's not among the page list. I worked around this by creating a page, creating a ...
1
vote
2answers
2k views

Adding custom text in items titles from wp_nav_menu()

I need to add something after each title of a specific menu called by wp_nav_menu() I tried add_filter('wp_nav_title', 'testing_stuff'); with function testing_stuff() { $item->title = ...
-3
votes
1answer
133 views

Is it possible to animate the Twenty Eleven menu? [closed]

I have a menu in my Twenty Eleven child theme that has some hierarchical items. Twenty Eleven handles it just fine, of course, but my client likes the fancy-looking menu animation that you can see on ...
0
votes
0answers
19 views

How do I add the menu item description to the menu? [duplicate]

Possible Duplicate: Menu items description? Custom Walker for wp_nav_menu() I know this question has been asked before, but I haven't quite found the answer I'm looking for. This handy ...
1
vote
2answers
483 views

Custom Permalink Plugin and Current Page/Ancestor in Menus

I'm looking for a custom permalink plugin that is able to interact with menu classes. For instance, I have a menu that includes the parent website.com/shop as one of its list items. If a page, say ...
2
votes
1answer
488 views

Custom Nav Walker to show siblings and children of current branch?

I have seen very similar (if not exact) queries to this all over Google, but always seem to find something short of what I need. I am trying to create my full vertical menu using wp_nav_menu in my ...
0
votes
2answers
208 views

How to add a menu that belongs to parent blog to all child-blogs?

I want to add a menu that belongs to parent multisite blog to all child-blogs. I need the menu displayed in all child-blogs, I mean the same menu on all multisites blogs. How I can do that?
3
votes
3answers
2k views

Change the_title() of a page dynamically

I'm developing a plugin that doesn't use a custom post type, but separate database tables. It's a plugin that displays a list of courses with links that lead to the different course detail pages, ...
0
votes
2answers
24 views

Styling Active Links Within Wordpress

I wish to style the active link (ie. when home page is selected that the home page link be a different colour) .current-menu-item a { color: #36c; } My test site is : www.milknhny.co.uk/ShopTest I ...
2
votes
2answers
1k views

Hide main div if wp_nav_menu is empty

I want to hide the div class "navmain2" if the menu is empty. See code below: <!-- Start main navigation --> <div class="navmain2"> <div id="logo"></div> ...
2
votes
2answers
58 views

How to gain access to each menu item in wordpress?

I have some menu items in a menu at location "main-menu". By using wp_nav_menu( array( 'theme_location' => 'main-menu' ) ); , i get all the 13 items in a div. Now i just need to show 10 menu ...