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)

1
vote
1answer
764 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 ...
1
vote
2answers
894 views

How can I Add a variable PHP in the Menu Nav

I want to add a variable in the Menu, for passing a value in all my page. The purpose is to retrieve a value for transport to another web site (from my website links) to the tracking, this value ...
1
vote
1answer
67 views

two menus show different menu based on what menuitem is selected on menu1

Iv got two menus: menu1 with three menuitems. menu2 which is based on which menuitem I selected in menu1 Like this: menu1 menu2 menu3 Home Tax Company Aboutus menu1 menu2 menu3 Home Posts News et ...
1
vote
3answers
665 views

Display three different levels of navigation from wp_nav_menu separately?

I have a three level nav setup using Wordpress menu creator. Structure: A —1 ——Y ——Z —2 —3 B C I wish to display each level of the navigation alone, in different areas of the page. With current ...
1
vote
1answer
673 views

Check if page is in a certain menu

I have a client that wanted two "main menus" and we needed to programmatically display whichever menu contained the current page. How can I do that? Ex: We're on the "About" page. Figure out which of ...
1
vote
1answer
534 views

how can i add css class on current page in wordpress wp_nav_menu

how can i add css class on current page in wordpress wp_nav_menu For Example I Want To Use It In Wordpress wp_nav_menu <li><a href="index.php?id=index&colortheme=green" class="selected" ...
1
vote
1answer
381 views

how to get nav menu list through menu name in wordpress

How to get nav menu list through menu name in WordPress I'm using this code by this code but showing all pages not working with custom nav menu name <?php ...
1
vote
2answers
189 views

Unable to create or edit menus

I'm running 3.4.2 on Ubuntu. I'm unable to make any changes to menus at all. Also I'm unable to upload anything (flash or browser uploader) to the media library. However plugins have no problem adding ...
1
vote
2answers
310 views

How to switch between the Primary Menus programmatically?

Lets say i created 2 Different Primary Menus (in the Appearance > Menu .. section). Then in the (Theme Location > Primary Navigation) Section, i can set 1 Menu to be activated. So how can i switch ...
1
vote
2answers
2k views

Wordpress Custom Menu Widget Style

I am wondering if anyone knows the best method for splitting 1 custom menu widget (located in my sites footer) in to 2 columns. There are a total of 8 links, so I would like it to be split in to 2 ...
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
1answer
183 views

Add a class at specific element in custom Menu Walker

I have customised my menu in wordpress by extending the Nav_Menu_Walker class and now i cannot figure it out how could i add a class at a specific ul element. I have this function which adds classes ...
1
vote
1answer
79 views

Creating a nav menu

I am not very familiar with WordPress so my knowledge with this is limited. I am working on a travel website where I need to show navigation menu and I am not sure how I can achieve the desired ...
1
vote
1answer
710 views

Add the current menu item CSS class to a custom page type archive in Wordpress menu

I've been reading a lot about this but couldn't find a solution. Basically I'm trying to show a current menu item on a dynamic page that is created by a custom page type archive. The default menu ...
1
vote
1answer
221 views

Return Page/Post ID's of Child WP_Nav_Menu items

Is it possible to return the Page ID of menu items? I specifically looking to get the IDs that appear in a rollover submenu.
1
vote
1answer
406 views

Different side menu on each page

Does anyone have a solution how to have different side menus on different pages? Do I need to create template for every page? I've registered many nav_menus in functions.php and than used pages ID as ...
1
vote
1answer
28 views

Using a page as home, how do I prevent nav from setting both home and page links active?

Let's say we have a site with four items in a managed menu, corresponding to pages: Home | Foo | Bar | Baz The "Home" item is a custom link pointing at "/". And we want the "Bar" content shown ...
1
vote
1answer
63 views

How can I add items to the menu via the PHP file?

I run a membership site and I want to add a tab to the navigation menu that says, "My Subscriptions" and then add certain pages to that tab, which will be specific for each member depending whether or ...
1
vote
1answer
135 views

Output menu navigation in php file

I have a WordPress site which generates a menu at the top of the page with this: <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?> This ...
1
vote
1answer
228 views

Best way to customise wp_nav_menu [duplicate]

Possible Duplicate: Menu items description? Custom Walker for wp_nav_menu() I'm familiar with WordPress and using the WordPress menu system. But I'm looking for a way to add custom HTML to ...
1
vote
2answers
1k views

Adding a 'mega menu' to my site without a plugin

Can anyone suggest the best way to go about adding a 'mega menu' to my wordpress navigation without using a plugin? The content in the mega menu itself does not need to be editable via the CMS ...
1
vote
1answer
745 views

wp_nav_menu, walker class, categories as classes of li

OK I'm trying to show my principal menu so I use the following code: <?php $defaults = array( 'theme_location' => '', 'menu' => '', 'container' => false, ...
1
vote
1answer
190 views

Plugin menu addition in multisite

$wp_admin_bar->add_menu( array( 'parent' => $menu_id, 'id' => $menu_id . '-example', 'title' => __( 'Example Menu Item', 'example' ), ...
1
vote
2answers
326 views

Why do the menu titles change with the renaming of pages?

I've created a custom menu using pages. For a lot of the list items, I've specified a custom menu title for the page... So, the About Us page becomes About on the menu, for example. Then, when the ...
1
vote
2answers
587 views

How do I create predefined menus for my theme?

This is my code thus far: function register_my_menus() { register_nav_menus( array( 'header-menu' => __( 'Header Menu' ), 'extra-menu' => __( 'Extra Menu' ...
1
vote
2answers
1k views

Custom Post Types don’t highlight in menu nav

Working on a theatrical events site. The structure requires several separate events areas, each with a top page listing events in the particular area, and corresponding individual events pages ...
1
vote
1answer
2k views

CSS for Created Menu “Active Selected” not working, everything else is!

I have created a Menu (for the nav bar) it is placed in a copy of the header.php file in my child theme right below: <?php wp_nav_menu( array( 'container_class' => 'menu-header', ...
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
2answers
1k views

Separator for custom nav menu

I creating a custom footer navigation in wordpress. I looked all over the wordpress documentation and still haven't found anything. So, what I'm trying to do is add an "|" in the navigation like this: ...
1
vote
1answer
99 views

Tidy nav menu classes except for edit-menu-item-classes and active class

I want to tidy the menu class and remove the <li> ID tags, but return the class which is added by CSS Classes (optional) and current class.
1
vote
2answers
95 views

Querying both pages and posts

I am building an "advent calendar" for a client and they are wanting a combination of specific pages and custom posts appearing on the front page, in a specific order. Things that need to be ...
1
vote
2answers
897 views

Using default WP menu functionality to link to custom post-type listing?

I'm completely starting over with a wordpress project that began a couple of weeks ago, and basically i'm totally discovering wordpress, so please bare with me. I might be completely misunderstanding ...
1
vote
1answer
452 views

add_submenu_page function to show videos table

wondering if its possible to show the attachments admin list for videos by using a custom menu link? Any pointers welcome! D. add_action('admin_menu', 'mt_add_pages'); function mt_add_pages() { ...
1
vote
1answer
792 views

Manipulating menu HTML

My site's menu uses the built-in menu under Appearance >> Menus. I want to make a very simple change: I want to wrap each of my menu's second-level ULs in a DIV. What's the simplest way to accomplish ...
1
vote
1answer
210 views

Menu item with no page, but with dropdown

I am using 2010 theme menu. Is it possible to have a menu item that has a drop down when hovered, but will not click though to a page/post. Just a dropdown, using the wp_nav_menu.
1
vote
2answers
3k views

How to style current page menu item when using a walker

I have designed a custom menu and would like to be able to style the individual li dependent whether it is the current page or not? I believe this is normally pretty straightforward using a class such ...
1
vote
1answer
158 views

Hard-coding custom menu elements for menu manager

I realize that one can add custom links through the menu manager but is there a way to manually create such components through the functions.php file? More specifically, one example here relates to a ...
1
vote
1answer
808 views

How to find out if page_for_posts is showing (in order to style menu item)

I have set a static page for posts (page id = 110). This page shold only be included in the menu when the user is logged in. The latter is achieved with the following addition to header.php (snippet ...
1
vote
2answers
351 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
166 views

Problem with empty class attributes when running a filter on nav_menu_css_class

I'm using the code below in order to remove all classes but the current-menu-item and current-menu-parent classes from the custom menus. It works very well, however, there's one nagging issue I'm ...
1
vote
1answer
499 views

How can I make this custom menu work?

Can someone share with me the easiest way to convert this to work with wordpress’s 3.0 built in menu support. So far I have the topnav menu working correctly, but I’m having a hard time getting the ...
1
vote
2answers
305 views

Where to place PHP code that inserts (or doesn't insert) menu item?

Where do I place the PHP code to insert or not insert a menu item based upon some condition, i.e. value of another PHP variable like so: $listItem = ''; <?php if ($condition) { $listItem = ...
1
vote
1answer
827 views

Bulk Custom Menu and Wp-Ecommerce

I have to add a lot of items in wordpress menu (lot of 2nd level items) is there any bulk menu item creation method available to do it ? is there any way to add wp-ecommerce categories in wordpress ...
1
vote
1answer
1k views

Show Home Link In wp_nav_menu but only on primary menu

This function adds a home link into my nav menu, but it is added to 3 other menus I am using as well. I don't quite understand where to add code to only display in my primary nav. function ...
1
vote
1answer
359 views

How to append to menu items selectively

I'm making this wordpress theme, and I need to create a menu that is vertical but its submenus are horizontal, like this: MenuItem SubmenuItem | SubmenuItem AnotherMenuItem SubmenuItem | ...
1
vote
1answer
125 views

Wordpress Custom Menus Issue

In my template I'm using calls like this to output some custom menus: <?php wp_nav_menu(array('container_class' => 'secondary-navigation', 'theme_location' => 'secondary')); ?> Ever ...
1
vote
1answer
89 views

Change name & menu_name for Profile in the default menu, w/o altering core files?

I want to change the name and menu_name of the profile menu in the default menu without altering the core files.
1
vote
1answer
689 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
1answer
434 views

wp-menu 'automatically add custom taxonomy terms' like it does for pages? [closed]

I've added a new wp_menu to my sidebar on a custom post-type page. The wp_menu displays a list of a custom taxonomies terms. I see that wp_menu has the checkbox to automatically add new top level ...
1
vote
1answer
810 views

has_term if/echo else/echo function

ok so i have a nav menu with the top level of menu items being static pages. When you highlight or visit one of them there is a sub-menu that pops up. Each one of them has there own sub-menu and each ...