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

Hide Menu items base on capability

What is the best way to add/remove items for the wp_nav_menu() based on user roles? For instance a custom menu that looks like: Some Page Some Other Page Special Admin Page Where the Special ...
0
votes
3answers
298 views

Fake mark a menu item as current_page_item/active in Wordpress

I have a custom post type called Books and a page structure like this: Home Products & Services - Services - Products -- Books I am using Wordpress custom Menus for the 1st level navigation ...
1
vote
1answer
102 views

Where do I add html code to the menu div?

When looking at header.php, I see the following line: <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?> That function is defined in nav-menu-template.php and generates the ...
0
votes
1answer
113 views

Custom Menu in Admin doesn't change menu in browser

i've just begun participating these stack overflow forums yesterday and had a great experience with someone who could problem solve with me. working from the admin panel under the themes tab i have ...
1
vote
0answers
313 views

Single custom post type's menu ancestor/parent is Posts archive page

I have created a theme by copying twentyeleven default theme. I have also installed a module Custom Post Type UI and created a custom post type called "Book". I have gone to Settings -> Reading ...
0
votes
2answers
130 views

Replace the slug of parent pages with # [closed]

I'm creating a Wordpress site with a Superfish CSS3 / Jquery dropdown menu, complete with hoverIntent as displayed here: http://users.tpg.com.au/j_birch/plugins/superfish/#examples As far as I can ...
1
vote
1answer
66 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 ...
5
votes
2answers
3k views

fall back for main menu?

I am new to WordPress, and am still trying to learn the in's and out's in much respect to this well known CMS. I am wanting to know, if I should or must have a Fallback for main menu? This is what I ...
1
vote
2answers
1k 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
1answer
166 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 ...
0
votes
1answer
60 views

What is the $menu parameter used of in wp_nav_menu()?

I have a theme where I register multiple menus in function.php. All menus have a unique name and a simple description (we just use the name of the theme so they all have the same desc but thats ok). ...
0
votes
1answer
191 views

changing theme folder name breaks menus - twentyeleven

I needed to change the twentyeleven theme folder name, so I activated the default theme, changed the twentyeleven folder name to X, then reactivated it. Everything worked except the menus were all in ...
1
vote
1answer
250 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 ...
0
votes
2answers
1k views

Adding html elements to wp nav menu

I know how to create wp menus using the functions.php and diaplay it in my sote wherever the menu is required (e.g top menu, footer menu) I even know how to style it using custom CSS. I would like to ...
0
votes
1answer
39 views

Custom menu: Link names

I would like to build a wordpress theme with a custom menu (no dropdowns, nothing fancy). I am trying to get wp_nav_menu do what I want, but I can't quite see how to achieve the following. I would ...
0
votes
1answer
55 views

Show posts of parent in edit.php

I'm creating a post type for a site where there 4 main 'parent' pages in a custom post type. For the sake of argument the post type is 'schools' the 4 (of many) parents are: Cambridge Teesside ...
0
votes
2answers
685 views

Blending Foundation's Tabs with Wordpress Nav Menu & Display Active Tab

I am currently working with ZURB's Foundation Framework. It's a terrific framework and my project is coming along a lot nicer and quicker than it would have beforehand. Foundation comes with ...
0
votes
1answer
247 views

Wordpress Menu - creating a fake link [closed]

I like to create Web site mockups for clients using Wordpress. Typically I will only create the landing page and a believable navigation menu. To keep from creating extraneous pages I will create a ...
-1
votes
1answer
368 views

highlight parent page on menu when child page is on sidebar (and not on menu)

i'm using twenty-eleven, i have on the menu 4 items : Home, About us, Contact, Clients it's a custom menu. The site currently is on localhost, so no preview is available. However i haven't put the ...
1
vote
2answers
2k 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 ...
0
votes
1answer
3k views

Submenu in sidebar custom page template

i would like to show the submenu of my page in a custom page template on the left side in a Sidebar-area. Does any know the code for showing the submenu. Wordpress 3.4.1 Thanks a lot!!!
1
vote
1answer
2k views

Using Zurb's Foundation Tabs as Wordpress Nav (Active Tab)

This is a question more geared towards those of you out there that have experience working with the popular SASS/JS Framework, Foundation by Zurb. I am trying to use it as my structural core to my new ...
1
vote
1answer
911 views

How to remove the HOME menu item

I am using wordpress 3.4.1. I am mainly creating a static site and for that have created and arrnaged the pages, and wordpress has nicely created the pages in proper nav-menu format for me, which is ...
2
votes
2answers
328 views

wp_nav_menu show 1 item only

I was reading Wordpress documentation and also trying to find some clear example of how to do this but I couldn't, sorry if this is posted elsewhere but I did my best trying to find an answer before ...
4
votes
1answer
1k views

How to get IDs for objects in menu branch?

Is it possible to print content of all menu items, when displaying menu (or branch of menu as in question about displaying menu branches) ? Once I click on About Us I wish for new page to display ...
0
votes
1answer
119 views

displaying meta key value with wp_page_menu

I know that WP3 offers wp_nav_menu and description field but I was wondering if it is possible to alter wp_page_menu to echo desired meta key value next to the page link in format that is adjustable. ...
0
votes
1answer
92 views

Second tier sidebar navigation

I'm trying to create a second level navigation in WordPress. I've found lots of examples, but none of them seem to do exactly what I want. This code below has me almost there, but I want an active ...
0
votes
2answers
438 views

How to implement a secondary menu?

I actually need to implement a secondary vertical menu like in here: http://www.adverum.lt/lt/paslaugos/korporatyvine-komunikacija It has to be vertical and it looks like it based on frames, but as I ...
0
votes
1answer
3k views

Getting menu items like get_pages

I need a way to create a custom HTML template for the wp_nav_menu function. I've heard of custom walker classes, but these don't appear to be helpful enough to achieve what I'm trying to do; at least ...
0
votes
1answer
190 views

How to add custom menu item on plugin activation?

When my plugin is activated, I would like to add a new menu item. Here is my code: class My_Plugin { function __construct() { register_activation_hook(__FILE__, array($this, 'install')); } ...
0
votes
1answer
548 views

Change the class of wordpress menu

I have problems with wordpress menu level classes. <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?> this is the code i used to generate my menu, First level menu id is ...
0
votes
1answer
1k views

Change sub-menu css class

I use custom menus with drop down. I want to make two different drop-down menus each with different styling. Wordpress puts drop-down items in a single ul with class="sub-menu". But I need different ...
0
votes
1answer
488 views

how do I delete (not exclude) a menu item from navigation bar

I'm building a site's navigation bar programmatically, using the following code: wp_update_nav_menu_item($menu->term_id, 0, array( 'menu-item-title' => $page_data->post_title, ...
1
vote
0answers
352 views

Help with walker for nav

For some reason, this walker won't work when I pass in 'echo ' => 0, it always prints the nav, and never returns the nav as a var. I can't seem to figure out where it's by passing that in ...
0
votes
2answers
885 views

How to add a second custom menu in my sidebar when theme only supports one?

I simply want a second menu in my sidebar to show on all pages. My theme only supports one custom menu though. I am using the first custom menu for the top level nav, and I wanted my 2nd custom menu ...
3
votes
1answer
257 views

Creating new dynamic menu including BP links [closed]

Perhaps I have missed something fundamental, but I am attempting to include the various dynamic menu items included with BuddyPress and other add-ons to my primary drop-down menu. For example, the ...
1
vote
1answer
150 views

Menus like a CMS

Here is an example structure of some content: Parent A -- Child A -- Child B Parent B -- Child C -- Child D Parent A should link to the content of Child A and Parent B should link to the content of ...
1
vote
1answer
101 views

Custom Post type menu highlighted in the archive/post

I created a custom nav menu for my custom post type by custom links (linked to the archive page). Let say I have a custom post type named "product", and when I click on the menu, it will go to the ...
3
votes
1answer
1k views

Dynamically link to the latest post or simulate request of specific post in page template

I want to have a link in the wordpress menu pointing to the latest post of a specific category. Because I am not able put a dynamic URL in the wordpress menu, my approach was to put a page with a ...
1
vote
1answer
873 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, ...
0
votes
1answer
353 views

wp_nav_menu action/filter help

Maybe an odd question, I have a site that makes heavy use of nav menus. I'm looking to improve my site's performance, and since the menus hardly ever change, I wrote some PHP to spit them out into ...
0
votes
1answer
493 views

Wordpress Menus - How to add inline styles to UL menus

I've just converted my HTML version of a theme over to Wordpress, and I'm currently converting the dropdown menus over. What WordPress processes: <ul class="dropdown"> <li ...
0
votes
1answer
276 views

Problem adding 'has-children' class to wp_nav_menu

According to a number of references online, I should be able to use the following function to add the class, has-children, to menu items that have children under them: function ...
1
vote
1answer
413 views

Remove admin menu

Ho do you remove admin menu items and dissable acces for users below admin ? The right way... // 1 - Remove Menu Items function my_remove_menu_pages() { if ( !current_user_can( 'administrator' ) ...
1
vote
2answers
498 views

wp_nav_menu() mark current item ancestor of custom post type

This solution does almost what I want it to. Only thing is, I have my menu set up as follows: Menu item 1 Menu item 2 Custom post type 1 Custom post type 2 Custom post type 3 Menu item 3 ...
4
votes
2answers
330 views

Automatically remove trashed pages from nav menu

As it is now, when a page that is in the nav menu is trashed, it still stays in the menu until manually remove via the nav menu editor. Is it possible to have trashed pages removed automatically? ...
1
vote
0answers
399 views

Custom Walker for wp_list_categories

I need some help with making of one Walker Class. Now I’m having a menu with categories and in the dropdown there are some subcategories. The menu is something like that: <div ...
0
votes
1answer
800 views

wp_list_pages not showing cpt as I expected

I have a CPT called 'vacancies' here is the code that registers it: function register_cpt_vacancy() { $args = array('labels' => $labels, 'hierarchical' => false, 'supports' => ...
0
votes
1answer
1k views

Sort wp_nav_menu() by menu order

I have made a custom menu handler for the back end, sorting the via a drag drop based on CMS Page Order. The problem now is that it seems that it's not possible to sort wp_nav_menu in any other way ...
1
vote
2answers
3k views

Search box as a menu item in the nav menu output by wp_nav_menu?

I am using the Twenty Twelve theme, and the following is the code it uses to register and display the menu. In functions.php: function twentytwelve_setup() { ... // This theme uses ...