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
4answers
1k views

How to set classname for <li> tag in wordpress menu?

I am using. <?php wp_nav_menu($args); ?> for get menu from wordpress.it returns the menus with <ul> and <li> structure. In that i need to set class name for every <li> tag ...
0
votes
1answer
707 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. ...
3
votes
3answers
7k views

Query menu_order custom post types

I added 'supports' => 'page-attributes' to my custom post type, and now i have the meta box for page ordering. When i use the argument 'sort_column' => 'menu_order' with get_pages() on my ...
0
votes
1answer
123 views

How to substitute old wordpress menu by wp 3 menu the right way?

I have a wp theme with this menu in header: <div id="header_nav"> <ul id="nav" class="clearfloat"> <li><a href="<?php echo get_option('home'); ?>/" ...
1
vote
2answers
556 views

How can I automatically add child pages to pages in a WP menu?

In the WP menu creation GUI there's the Automatically add top level pages option. I would like to do the opposite, for any page that is in the menu, automatically add it's child pages. Is there a way ...
2
votes
1answer
359 views

how to assign more permission to wordpress author

I have installed jw player plugin so that users of my site could upload their videos. Right now, admin can only see jw player menu on the admin panel and he can only upload videos and use this plugin. ...
2
votes
5answers
737 views

How do I highlight the menu for a child page?

EDIT: This used to be How do I force a page to be is_archive == true? I was trying to solve the wrong problem. Instead of forcing the post/page to have a particular attribute, I should have ...
8
votes
1answer
4k views

add custom class to wp_nav_menu using filter hook nav_menu_css_class

I have a custom post type in my wordpress theme. I want to add a custom class to the nav menu for the pages created in that custom post type. I read that you can use a filter hook: ...
1
vote
1answer
94 views

Operable default menu *and* custom 3 menu

OK, this is a basic question...I'm upgrading a theme I built (from scratch) to support 3.0 menus (finally). With the new wp_nav_menu tag, as expected, the tag's default container is added when a ...
0
votes
1answer
416 views

wp_nav_menu and its fallback

When I use wp_nav_menu(array( 'theme_location' => 'mainnav', 'container' => 'nav', 'container_id' => 'mainnav', 'container_class' => 'clearfix', 'depth' => 4 )); ...
1
vote
1answer
92 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
2answers
1k views

Show recent posts in menu?

I'm building a menu which contains categories. Is there a way to make each menu option show a list of recent posts in that category when you hover over it?
1
vote
1answer
732 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
857 views

simple expandable vertical menu, java script problem

I am trying to create a simple expandable menu in wordpress. Bellow you can see the javascript I am using (copy and mix from internet). <script type="text/javascript"> ...
1
vote
1answer
218 views

What is the best way to create a menu item that links to all posts with a certain tag?

I guess the title says it all. Short of creating a page with a custom template that links all the posts with a given tag (this is NOT a scalable solution, particularly if you want to let a customer do ...
1
vote
3answers
7k views

How do you get the current-menu-item ID?

Im trying to get the id of the menu item that has be class called "current-menu-item". Not the current page id, but the nav item id. Please help
2
votes
2answers
1k views

wp_nav_menu log in/out link?

I have a wp_nav_menu showing pages, but I'd also like to include a log in/out link, based on the current state of the user, which will redirect them to the home page. I've looked far and wide, but ...
0
votes
1answer
1k views

Different Menus based on Category Page

I was trying to set up different menus based on what category "page" you were on using the built in Wordpress menu editor. In my header file I set up: <?php if (is_home()) { $menu = ...
20
votes
2answers
20k views

Any docs for wp_nav_menu's “items_wrap” argument?

I'm using wp_nav_menu and am trying to create custom output for the sub-level drop downs. I came across the "items_wrap" argument but there's really not much information as to what it is, how it ...
1
vote
1answer
474 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 ...
0
votes
2answers
81 views

Pick out specific menu item from code

I'm using this bit of code to generate a menu: <div id="menu"> <?php $args = array( 'depth' => 1, 'show_date' => '', 'date_format' => ...
3
votes
1answer
1k views

Can you have different menus and theme on a per-page basis?

I am planning to have a new site created using WP pages. My company is focusing on 3 or 4 discrete areas and one of those I want to promote in particular, with its own set of pages. Ideally it would ...
1
vote
1answer
4k views

Remove li from wp_nav_menu

How can I remove the li from wp_nav_menu? I know I can remove ul but is it also possible to remove the li? I would want to do this on just one menu not all the menus on my site.
2
votes
1answer
274 views

Accesibility problems with dropdown menus in twentyten theme or others

Some time ago I discovered that dropdown menus that do have clickable links on parent nodes are confusing for the users. Often they are not seeing that they can click on the parent, they just assume ...
4
votes
1answer
1k views

Taxonomy menu with post count and multiple parents

I'm using WordPress 3.1.3 and trying to make a "product" menu with post count in each category. Like this: New Cars (4) BMW (2) Ford (1) Nissan (1) Used Cars (10) BMW (3) Ford (1) Nissan (6) ...
1
vote
1answer
851 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 ...
2
votes
3answers
610 views

HTTPS page link in menu

Ok, so I have a wordpress site with a lot of pages and menus that I've defined in the appearance/menus section of wordpress. One of my pages has a little payment form on, which I'd like to link to ...
0
votes
2answers
3k views

wp_list_pages sort order by custom nav menu order

Does anyone know of a way to create a sitemap by using wp_list_pages and have the order by the same orders a custom nav menu?
0
votes
1answer
153 views

plus sign not working in widget “Header: Nav Menu”

I installed a new WP site with 3.1.2. The way I set menu/header on my other sites was with the widget "Header: Nav Menu". When I go to that widget now, clicking the + sign to the left of "Items" ...
0
votes
1answer
698 views

Show All Children of WordPress Menu

The code below shows the active sub menu of the Main Menu. It's nearly perfect, however, I need it to show ALL subitems of these sub items, and their children. AKA unlimited depth. Thanks in advance! ...
0
votes
3answers
514 views

Page menu with one image link instead of page title?

I have the following code generated by wordpress for my nav1: <div id="nav1"> <ul class="menusm"> <li class="page_item page-item-6"><a title="Inicio" ...
3
votes
3answers
10k views

Show specific menu item from wp_nav_menu based on id

I have a wp_nav_menu "Main Menu" such as the following: Top Level (#menu-item-1) Sub Item Sub Item Top Level (#menu-item-2) Sub Item Top Level (#menu-item-3) Sub Item A Sub Item B Sub Item a.1 ...
3
votes
1answer
409 views

How do I create a magazine type menu - sub-menu setup using wp_nav_menu and child of twentyten? [closed]

I'm trying to create a menu and submenu with a child theme of twentyten, similar to this at the LA Times: http://www.latimes.com/ where when the site is first opened, it displays a set of childs, and ...
0
votes
1answer
898 views

removing the list container <ul> from the custom menu output

any suggestions on how to get rid of ul tag wrapped around li tags in custom menu here at http://www.blueoceanportfolios.com/careers/ the custom menu is outputted with nested tags around like ...
15
votes
4answers
10k 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]"> ...
7
votes
1answer
574 views

Assign a Class to the Current “Tag” for Formatting

Essentially what I am hoping to replicate is something like the "current-menu-item" class that is applied to WP Menus. My client is wanting to use Tags as a sub-nav, and I've managed to get the tags ...
0
votes
2answers
481 views

Navigation list not correctly styled on pages with custom template (missing .current-menu-item)

My Wordpress site uses a custom front page (home.php). The blog page uses a template (blog.php). However when I visit the blog page the navigation bar does not highligt the current page. This is ...
1
vote
2answers
245 views

Adding existing links to custom navigation menus?

When I visit Appearance → Menu, I can add custom links, but not any links I've already created under Links. How can I do this?
0
votes
2answers
1k views

Make menu items open in new tab/page

How do I make menu items open in a new tab/page instead of replacing the current page?
0
votes
1answer
346 views

Do not hyperlink menu heading

How do I make a menu entry that's just plain text, not a link? My kludge workaround is linking to "/", but I'd prefer no link at all.
3
votes
1answer
1k views

How can I get my Custom Post Types to appear in nav-menus.php 'Menu'?

I am having a bit of a problem with my custom post types. I can create them fine in my theme, but I cannot get them to show up in the 'Menu' screen ... at least not by default. I have tried adding ...
0
votes
1answer
200 views

Can't display custom menu using name?

I want two menus using the new WordPress 3.0 feature. In functions.php I have: function register_my_menus() { register_nav_menus( array( 'header-menu' => __( 'Header Menu' ), ...
1
vote
2answers
1k views

Force PDF download from custom menu?

I added a link to a PDF in my custom navigation menu. Is there a way to force it to download instead of open?
2
votes
2answers
403 views

adding .current* tags to custom post types and taxonomies

TwentyTen adds some classes to custom menus, for instance: #access #menu-item-262.current-menu-item, #access #menu-item-262.current-menu-ancestor All the top-level links in my primary navigation ...
1
vote
2answers
1k views

How to insert custom code into wp_nav_menu structure?

I was able to use <?php wp_nav_menu( array( 'theme_location' => 'primary-menu', 'container' => false ) ); ?> to create the menu within my theme. Messed around with 'items_wrap' but ...
0
votes
1answer
121 views

Problems in creating a static site with WordPress

I want to create a static, company brochure site. I created a page called "HOME" and I was able to change the reading settings to static, and select "HOME" from the drop down box. I then created a ...
5
votes
4answers
12k views

How to get current-menu-item title as variable?

Is possible to get current-menu-item as a php variable? I'm listing the category museums via the menu item 'museums we support' so i'd like the get 'museums we support' bit and display it somewhere? ...
0
votes
1answer
335 views

Lightword Theme - only one menu item

Since I am pretty new to WP and the whole stuff i ran into a problem. I am using the pretty-well known "Lightword" Theme. And today i've upgraded to the newest version. It's now possible to add/edit ...
1
vote
1answer
692 views

Menus - Open items in new tab/window?

I have 3.1.2 running with the Boldy theme. Site link. I have a menu that has a number of external links listed in the items. By default, these items do NOT load in a new tab/window. There is no ...
0
votes
1answer
541 views

Add a menu metabox to post edit page

I have a basic understanding of how to create meta boxes, and I have an understanding of how and where to put wordpress menus on the front end. I am a wordpress theme developer but NOT a wordpress ...