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
78 views

Custom menu deletes itself

I've set up a menu on one of my sites. The menu has ~30 items. Everything is fine, but at some point the menu crops itself and displays only the first 12 item. Does anyone have an idea why this is ...
4
votes
2answers
5k views

Dynamically exclude menu items from wp_nav_menu

I tried looking for info about how to exclude/remove nav menu items from custom menus, and the only thread I found did not have any answers that were useful to me. 1. Background: I put together a ...
1
vote
1answer
555 views

wp-custom-menu filter removes the current_page_item class

After adding wp-custom-menu-filter plugin - to hide some menu items for not-logged in users, the current_page_item class disappeared from my menu. $item->classes in the walker is an empty array, ...
0
votes
2answers
243 views

Disabling tooltip on menu items

For some reason, my menu items are showing tooltips on hover-over- In other words, the menu links have "title" attributes being added to them. Looking at my other, older WordPress sites, this is not ...
0
votes
1answer
958 views

wp_nav_menu: output featured image of each page listing

Context: I am building a portfolio index where I can sort the individual project links in my sidebar by priority of appearance. I've successfully done this using the wp_nav_menu(), where each project ...
0
votes
2answers
220 views

Remove the current item from a menu

I have a menu. It has two items: the first is a link ("Index", www.domain.com) the second one is a link to a category page I have the requirement to remove the first link when I'm on the index ...
0
votes
1answer
160 views

How to output all taxonomy links from a custom post type in a menu?

I made a custom post type called Product. And a taxonomy with the name 'product-category'. These taxonomies have pages where we show a list of the products that have that taxonomy. Now my question is ...
-1
votes
2answers
846 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 ...
16
votes
7answers
21k views

Highlighting wp_nav_menu() Ancestor Class w/o Children in Nav Structure?

(Moderators note: Was originally titled "wp_nav_menu Ancestor class without children in navigation structure") I have a wp_nav_menu in my header which had three pages in it. When I am on one of those ...
0
votes
1answer
319 views

Getting the WordPress custom menu titles and outputting them in a theme

I have created a number of custom menu slots in my WordPress theme, and the output of the links into them has been very easy. Unfortunately I cannot find a way to output the user entered title for the ...
1
vote
2answers
314 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 = ...
0
votes
1answer
107 views

Parent/Child pages

I find that the parent/child pages in the "Pages" area of WordPress has become a bit confusing since the introduction of the new menu creation area. Using the new menu system, as far as I know I can ...
1
vote
2answers
255 views

Menus, but not by theme location

I'm trying to figure out how to display a menu that has been created, but without having to assign the menu to a theme location. From what I can tell, you have to assign a menu to a theme menu ...
0
votes
1answer
305 views

What is the current page's Taxonomy?

I need to be able to switch between the current page taxonomy so I can load in the appropriate menu: $current_tax = 'need to get this from somewhere'; switch ($current_tax) { case 'tax1': ...
2
votes
3answers
3k views

Using Shortcodes in WP-Menus in WP 3.1 (via nav_menu_objects)?

I've found this new plugin http://wpsmith.net/wordpress/creating-multiple-custom-menus-in-wordpress-3-1 that is using a new 3.1 hook (wp_nav_menu_objects) to remove specific nav-menu-items from the ...
2
votes
1answer
1k views

Add meta data to the menu

I encountered this problem what i thought to be one of the worlds simpliest things, I wanted to add a subtitle to the menu somethin alike this http://img4.imageshack.us/img4/7816/unled10b.png . Then i ...
0
votes
1answer
132 views

Editing the nav menu?

I want to add | (vertical lines) between the page links in the nav menu. What's the easiest way to do this?
1
vote
1answer
520 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
1answer
1k views

Get menu object from theme_location

I'd like to get a menu object from its theme location argument. My goal is to output separately the menu name and its items name, url and description. Example of what I'm looking for : $menu = ...
1
vote
3answers
325 views

Implementing a tricky wordpress menu (nested categories + thumbnails)

I'm trying to make a layered wordpress menu, out of categories. Here's how it's going to look: I have no clue how to develop this, can't do it with get_posts (not sortable by parent/children), or ...
0
votes
1answer
497 views

.current_page_ancestor broken in Twenty Eleven

I would like to have a level 1 menu in a vertical menu and a full menu in a vertical menu in the left sidebar in Twenty Eleven. My problem is that I would like to make the top item bold if the user is ...
0
votes
1answer
338 views

Can't insert internal links and menu errors appearing

I'm getting this error every time I add an item (page, post or category) to my menu system: Warning: Invalid argument supplied for foreach() in ...
0
votes
1answer
1k views

How do I remove WordPress Custom Menus hover event and replace it with jQuery onclick?

I am using the WordPress (Appearance > Menus) feature to create a custom navigation menu. I created a menu item that has a dropdown and would like to activate the dropdown menu with a click rather ...
1
vote
2answers
2k views

Filter out built-in wp_nav_menu classes but keep custom class

Im trying to remove / filter our all the classes from the wp_nav_menu, EXCEPT the custom ones that i insert (in the "CSS Classes (optional)" field) when creating the menu in the admin. I found a ...
0
votes
1answer
457 views

WordPress Custom Superfish CSS Problem [closed]

The problem can be found here: http://themeforward.com/demo2/ Use my menu and navigate to Features > Shortcodes > Typography. Notice how the border ( ul .sub-menu { border:1px solid #000 } ) moves ...
1
vote
1answer
535 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 ...
0
votes
1answer
102 views

Highlighting top level link when viewing one of it's sub-pages, which are not linked in the menu

I have a page that is not linked in my custom menu. This page has a parent page, which is linked in the custom menu. If I go to the "not-linked" page, I want to to highlight it's parent page link in ...
1
vote
2answers
2k views

How to test if blog page is active

bear with me here as I explain my problem. Generated menu via wp_nav_menu, so I have use of the .current_page_item class. The thing is, I've used jQuery to replace the generated link text with some ...
4
votes
3answers
7k views

wp_nav_menu remove class and id from li

I'm new to wordpress and trying to learn my way through from making a theme. Right now I am using wp_nav_menu to generate my menu My menu consists of pages and categories However, the default ...
0
votes
2answers
122 views

Custom Post Menu link reverting to Blog menu item

So I have a Custom Post Type setup and running with no issue. I also have a WordPress menu object as my primary navigation. I added my Custom Post to the main menu and when I click on to the landing ...
0
votes
1answer
246 views

Is there a limit to number of pages displayed for selection in custom menu?

I recently started working with a client who has over 400 pages on their WP site (yes, pages, not posts). Their menu needs to be redone, so I decided to go the 'custom menus' route. However, not more ...
1
vote
3answers
832 views

Custom Menus: dynamic highlighting problem with custom home link

I'm currently implementing wp_nav_menu - all has gone well save for dynamic highlighting. The menu code looks like this (when home, which is a custom link, is selected): <div ...
5
votes
4answers
638 views

How can I enable Google Analytics on a file download link?

I'm using Wordpress to present some software for download. The download links are provided via Custom Link entries in a side menu. I would like to enable Google Analytics tracking for these file ...
1
vote
1answer
139 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 ...
0
votes
1answer
2k views

Count within foreach loop

How can I echo out the count of within a foreach loop? I want to change the class of the div below so it's menu-button-1, menu-button-2 etc etc: <?php $pages = get_children(array('orderby' ...
0
votes
2answers
110 views

Creating a custom menu

I want to create a custom menu in the style below, can this be done? The code in brackets needs to grab the actual page content for each page. <div class="menu-button-(page-name)"> <a ...
0
votes
1answer
111 views

Custom menu styling

I'm trying to style a custom menu here so that I can let other people manage this site alongside myself. What I'm trying to do is remove the text for the top level links while leaving the a as a ...
1
vote
1answer
177 views

Review site custom post type structure

I build a review site with Wordpress. I created a custom post type called "Reviews", inside this, theres two taxonomy, one called "Genres" and one called "Types". Inside the Genres, i have a couple of ...
3
votes
2answers
4k views

Navigation menu with children shown only for current page

I've been playing around with Wordpress' menu functionality (wp_nav_menu and wp_list_pages) to build a menu for my site. It's coming along, but I'm still having some trouble getting the behaviour I'd ...
5
votes
1answer
777 views

Deleted pages are NOT removed from custom menus?

When I delete a page, post or category that has previously been added to a custom menu, the delete routine is apparently not checking to see if the item belongs to a custom menu, and thus its not ...
1
vote
3answers
2k views

Add a #hash to the links in my custom menu

I have created a static frontpage where I load in the content of all my pages. Now I have a normal custom menu, but the links refer to the pages, for example: http://mysite.com/about Now the I want ...
0
votes
1answer
896 views

Styling issue with custom menus and sub menus

In a previous question I asked (and later worked out) how to style sub menus, I want to expand on that with another question related to styling sub-menus. I have hit an issue were if the parent is ...
0
votes
1answer
89 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 ...
2
votes
2answers
1k views

How to determine if custom menu is active?

My theme registers custom menus with this function: function nav_menus() { if ( function_exists( 'register_nav_menus' ) ) { register_nav_menus( array('main-menu' => __( 'Main ...
0
votes
1answer
1k views

Trouble highlighting correct menu parent with wp_nav_menu classes while viewing “single posts”

I just updated a menu on a site of mine to utilize wp_nav_menu. Setting this up with WP was fairly straight forward however I've run into one small snag with the the way wordpress is outputting its ...
2
votes
1answer
648 views

WP_nav_menu fallback not working

I just realized the fallback doesn't work for my project when a custom menu doesn't exist. I can't figure out what I am missing. Here is the code that displays the nav menu: $menu = wp_nav_menu( ...
0
votes
2answers
166 views

How to list only root pages?

I want to show only top level pages, without the dropdown. I am trying to set the depth to 0... wp_nav_menu( array( 'theme_location' => 'primary', 'depth' => 0 ) ); But it generates: ...
0
votes
1answer
1k views

How to change order of menu items

How can I change the ordering of menu items -- for example to make 'Wordfruit Copywriters' appear before 'How can you sell more of your product?' here: http://richardclunan.com/ Thanks, Richard
1
vote
1answer
127 views

Settings page above CPT page in admin section

I'm creating a plugin which generates a handfull or custom post types (CPT). I've create a top level menu in the admin left sidebar using add_menu_page(). I then added all CPTs to this menu using ...