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
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 ...
1
vote
1answer
165 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
248 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
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 ...
1
vote
1answer
866 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
196 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
436 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
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
2answers
1k views

Get parent page/menu id of current post

Basically, after setting up the initial "page for post" on the Reading Options, and then add that page to the menu I get the posts when I click on that menu item as expected. On there I know the post ...
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
4k 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
103 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
99 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
950 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
475 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
256 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
4k 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
169 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
927 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
439 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
173 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
524 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
316 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
854 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
381 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
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 ...
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
1answer
722 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
463 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
839 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 ...
1
vote
2answers
241 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?
1
vote
1answer
1k views

Error “The given object ID is not that of a menu item” on menu with 40+ items

When ever I try to add menu items past about 40 I get an error "The given object ID is not that of a menu item" and many of my menu items will disappear from the menu at random. The site I am working ...
1
vote
1answer
1k views

Dynamic sidebar nav with current page highlighting

My sidebar loops through all of the child pages based on the parent page. For example, if you're in the "About" section you'll only see "About" child pages in the sidebar. My problem is that I have ...
1
vote
1answer
207 views

How to make link to different categories that in them selves loads different menus?

Im kinda a noob but have made some homepages for fun but got this new one that im making for a friend that´s stopped my dead in my tracks: http://yellowknife.se/artfex/ The popup (ugly as hell and ...
1
vote
2answers
797 views

How do I add (css) class to a custom link to make it current_page_item

As a custom menu item wp doesn't add the class current_page_item All other links it does? <ul class="nav" id="menu-mainmenu"><li class="menu-item menu-item-type-custom menu-item-home ...
1
vote
2answers
308 views

Can only get one of two custom menus to display

I'm a wordpress beginner and at the moment struggling to get to grips with custom menus. I have created two menus. Wordpress tells me the theme supports two menus. I have <?php ...
1
vote
2answers
430 views

How to set my main menu items

I am new to WordPress development, hope this is not a too stupid question. How can I setup my Menu such that it has links to Home About (Page) Blog (I think posts in all categories except Portfolio ...
1
vote
1answer
636 views

Controlling Taxonomy Category listings to hide and unhide specifics

I have a vertical menu using the superfish script that shows categories in a custom 'productcategory' taxonomy. This menu has multiple levels, and is hierarchical.At the bottom of each branch of the ...
1
vote
1answer
120 views

How do you cope with the task of adding hierarchy to the navigation menu?

Say we got a theme with a horizontal menu that shows only the top-level pages. How do you manage with the task to make the menu hierarchical, adding subpages? Any appropriate plugins for that? If ...
1
vote
1answer
1k views

How can I detect whether a BuddyPress page is active from within my theme?

I'm trying to work sub-menus into my theme but am running into issues when navigating to BuddyPress pages (as opposed to standard WP pages, posts, etc.). Basically, what I want to do is have pages ...
1
vote
2answers
16 views

Need Random Category Nav Menu

I have set my category navigation menu to display home and 5 of my categories and their respective posts when the category tab is clicked, as that is all the space there is to display in the menu bar. ...
1
vote
1answer
38 views

Use custom walker to add taxonomy terms to main nav menu

I created a Custom Post Type: Product and a Taxonomy assigned to it: Products So under that Taxonomy I can add different types of products (terms if i'm not mistaken). When adding new products I get ...
1
vote
1answer
56 views

How to remove admin main menu name repetition

I have added an admin menu using add_menu_page. When there is a sub menu with add_submenu_page, The main menu name is repeating. How to remove this repeating menu ? This is my code ...
1
vote
0answers
27 views

Insert menus in the database

I want to create a large menu structure, and the admin pages time out, so I cannot insert them via the admin screens. How can I insert the menu entries directly in the database? Thank you
1
vote
0answers
25 views

Weird behaviour on Edit Menus screen

I am running WP 3.9.1. Fresh install. ACF and Gravity Forms are the only two plugins running. Perhaps someone had this issue before... On the edit menu screen I have a tab called "View All" where I ...
1
vote
1answer
142 views

Change an li class name in a wordpress custom menu walker

I'm building a nav that has a class applied to the main LI's and the nested LI's. Example: <ul> <li class="className">Test</li> <li class="className">Test <ul> ...
1
vote
1answer
38 views

Which settings/options are saved on a theme-basis and how does this affect theme-switching?

I realized that when switching the theme (in my case to a child theme) some things don't stay the same: Widgets Menus At least this is what I found out so far: Widgets Don't lose widgets when ...
1
vote
0answers
31 views

Unlimited WordPress Menu

I am limited to like 80 menus. My menu consists of 1000 menus. How can I increase the limitation of Appearance > Menu I tried modifying the php.ini (using reseller account) and increase the max_var, ...