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)

0
votes
2answers
809 views

Removing strip_tags not working on nav_menu_description

So I'm adding descriptions to my site's main menus. Checked the box, added the text. Dropped in a custom walker in functions.php. Dropped in a wp_nav_menu call in header.php to call the custom walker. ...
0
votes
3answers
4k views

Add Buddypress profile and messages link to Wordpress menu

In the wordpress menu I would like to add a link to the buddypress user profile and messages. These links are dynamic based on the username like, ...
0
votes
2answers
843 views

Add a submenu to wp_nav_menu

I literally don't know where to begin with this. The only wp_nav_menu() documentation I found was http://codex.wordpress.org/Function_Reference/wp_nav_menu and all submenu docs reference a different ...
0
votes
1answer
1k 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
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 ...
0
votes
3answers
6k 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
0
votes
2answers
763 views

How to add pages to custom menus on the fly [duplicate]

Possible Duplicate: Can I add pages to my custom menu via script? My theme has a custom menu called "Custom Header Menu" and i've got a plugin that sets up site defaults and creates my ...
0
votes
2answers
1k views

Including link to custom post type in 'wp_list_pages' function

I am generating a navigation menu on my website using the wp_list_pages() function and I also am using a couple of custom post types with a post type archive function. How would I go about adding a ...
0
votes
1answer
562 views

How do I add a custom sublevel menu specified in one directory to a custom top level menu specified in another directory?

I'm working on a plugin that constructs a top level menu and resides within its own directory in /wp-content/plugins. For example, the plugin looks like this: function main_menu() { ...
0
votes
1answer
138 views

Create a url structure for my blogs based on categories and sub-cats

My blog design heavily relies on categories and sub-categories. I would like the url structure to be dependent on that. How can I make the url's support the same? I would like it to be like: ...
0
votes
1answer
24 views

How to add a element with walker menu right after begin of the navigation tags?

I was trying to add a element right after begin of the navigation tags and before the ul will start. So add a element directly after opening nav tag. I tried this, but this will add a list item after ...
0
votes
1answer
39 views

Add login hyperlink to secondary navigation menu

I have the following lines of code in my functions.php file: #-----------------------------------------------------------------# # Custom menu ...
0
votes
2answers
41 views

Bootstrap button menu on wordpress

I have a simple 4 item menu on wordpress. I want to use the bootstrap button style for this menu. This is the hand-made code of what I want to get. <div class="menu-menu-container"> <ul ...
0
votes
2answers
37 views

Add Labels to Admin Menu ( How To )

I have a custom post type menu called "Notes". It has two basic sub menus: add new and show all. But I want to add more items under these post type but the default array just gave me these. How can I ...
0
votes
3answers
132 views

Adding Additional Menus In Genesis Child Themes

I have a Genesis child theme that I bought, and it only supports two menus, a primary and a secondary. However, for what I would like to do with my site I need to have 6 menus all together. This is ...
0
votes
1answer
54 views

Want to add different text after each menu item

I want my main nav bar to display menu items with very short description of said menu under each item's title. To do this, I was hoping to just inject the menu item's 'title' attribute into the ...
0
votes
2answers
42 views

How to create a menu item which is not a page

I have a few pages that contains technical tips. I would like to group these pages under the title "tips" in the menu bar, but I don't want to make the item "tips" clickable because it does not ...
0
votes
1answer
106 views

Editing or filtering the output of the Genesis navigation

I'm trying to edit or apply a filter to the default Genesis navigation genesis_do_nav Currently I'm extending a Walker class to add a <span> with data-attribute around the navigation's link ...
0
votes
2answers
112 views

wp_nav_menu $theme_location parameter ignored

This is the first paragraph of the documentation of the function wp nav menu: Given a theme_location parameter, the function displays the menu assigned to that location, or nothing if no such ...
0
votes
1answer
16 views

Custom Menu not functioning properly

I register 2 menus in my functions.php file: register_nav_menus(array( 'main_menu' => 'Main Menu', 'bottom_menu' => 'Bottom Menu' )); I populate a menu in the admin and assign the ...
0
votes
1answer
271 views

Custom menus created but does not show up in admin panel

I am developing a theme of my own. In functions.php I added - add_action( 'init', 'register_my_menus' ); function register_my_menus() { register_nav_menus( array( 'front_login_menu' ...
0
votes
2answers
104 views

Why wp_nav_menu() doesnt show the proper meny when invoked two consecutive times?

I just noticed something weird I never saw before. I'm working on a project using WP 3.6.1. This project that has two different menus (actually, three, but that's not important). I'm calling them ...
0
votes
2answers
548 views

Show children (sub-navigation) of active menu item only

So I've searched the net and attempted to code a custom walker class that will do this, but I'm new to WordPress and although similar questions exist none fit exactly what I'm looking for, or suggest ...
0
votes
1answer
286 views

How to get Menu Navigation Labels to output HTML

I'm trying to follow Jason Bradley's advice on how to style my Wordpress menus. Specifically, I want to insert an icon before my navigation items using Font-Awesome. I tried putting this code in the ...
0
votes
2answers
53 views

Hide a menu on posts

Is it possible to not have a menu on post pages. I think it would be something like "if page show menu, if post don't show menu" but I'm not sure how to put that into PHP. Thanks
0
votes
1answer
29 views

Retrieving a list of menu items in an array

I am currently am working on a custom theme. In this theme, I have a menu that I registered using register-nav-menu, and then I am displaying the menu to my web page using the wp_nav_menu function. ...
0
votes
2answers
63 views

Rename menu items for All except super admin

I can rename wp-admin menu items But How Can I active it for all users except Super Admin ? add_filter('gettext', 'rename_admin_menu_items'); add_filter('ngettext', 'rename_admin_menu_items'); ...
0
votes
2answers
94 views

remove menu items if user can't read

I want to create one menu for all users and then hide / remove items from the menu if they don't have access to the page the link leads to. This to me seem like an SOP. I really don't understand how ...
0
votes
2answers
441 views

Limit top level menu items on wp_nav_menu

I've got a situation where I need to limit the top level menu items on a custom menu. The design only has room for 4 fixed width items, and I want to future proof it from displaying more. Looking at ...
0
votes
3answers
98 views

How can I add a class to a single menu item?

I'm trying to modify a non-WP theme to be compatible with my newest WP project, and one of the issues is a drop-down menu item. Since it's a totally custom theme, I want to replicate the behavior of ...
0
votes
2answers
88 views

How do you center the main menu in CSS? [closed]

Do any of you know of a way to center the main menu on my company's site? I have been trying all day and am frazzled! I've tried editing the stylesheet but nothing has fixed it. I've tried throwing ...
0
votes
1answer
160 views

wp_get_nav_menu_items order doesn't work

I am using this function $args = array ( 'order' => 'DESC', ); $items = wp_get_nav_menu_items( $custom_menu, $args ); then, if I change args to $args = array ( 'order' => 'ASC', ); ...
0
votes
1answer
131 views

how to automatically generate hierarchical menus from hierarchy of pages?

I have a photo site, and I take care to crested a logical nested hierarchy of pages. e.g. for photos I just posted, I created the following pages: site.com/2013/ site.com/2013/colorado/ ...
0
votes
1answer
134 views

How to display custom post meta in the appearance->menus page

I'm working on a website and added a custom meta option for all pages / posts called: "Location". $value = get_post_meta( $post->ID, '_privacy_location', true ); I'd like to add the value on ...
0
votes
1answer
264 views

PHP script from functions php is loaded via admin-ajax to div…and the result is 0, not the desired content

I wish to use accordion menu http://wordpress.org/plugins/jquery-vertical-accordion-menu/ via function that is loading different menu based on page template. What is more, I wish to ajaxify that ...
0
votes
1answer
780 views

Add child pages automatically to nav menu

I have built a custom menu in Wordpress that contains links to posts and pages. I am adding it to my header using this line of code: <?php wp_nav_menu( array( 'theme_location' => ...
0
votes
1answer
297 views

How To Display A List Of CPT Posts In A Meta Box On Menus Page?

Is it possible to display a list of the custom post type POSTS, not archive link, inside a meta box on the nav menus page? Currently, it displays each CPT post inside it's own metabox, but I would ...
0
votes
1answer
125 views

Navigation menus not showing because of custom post type filter

I use this filter to show content from all custom post types in tags archive page function tagFilter($query) { $post_type = $_GET['type']; if (is_tag()){ if (!$post_type) { ...
0
votes
1answer
351 views

Keeping 'current-menu-item' highlight of navigation menu?

The navigation menu of my site is generated via wp_nav_menu( array( 'theme_location' => 'primary') ); Some menu entries are category pages (say /category/news/). This page contains links to the ...
0
votes
1answer
503 views

magic “MENU” button under Twenty Twelve theme

I'm using Twenty Twelve with one of my sites on WordPress and someone told me that the site wasn't appearing as it should. She told me that instead of the menu, she saw a "MENU" button, which if ...
0
votes
1answer
75 views

How to add menù section to my WordPress template?

I am pretty new in WordPress blog and I am developing a blog with this template: http://scorejava.com/wordpress351 As you can see at the top of the page there is a "menù" that only show the page in ...
0
votes
2answers
73 views

How to add a page to header that is outside of WordPress?

I have a page on my site that is not a page in WordPress. How can I add it to the header? EDIT: The page is .php. It is outside of the theme structure.
0
votes
2answers
411 views

How can I add a delay to the collapsible menu in Twenty Eleven?

The navigation menu closes immediately upon moving the mouse outside of the menu item's area. How can I introduce a delay that will keep it open a second or less to keep visitors from becoming ...
0
votes
2answers
638 views

Menu Arrow for Child Element

I have a menu for a website I am designing and there are parent and child elements...I was wondering if there was someway I could add an arrow to my navigation if the parent has a child element? My ...
0
votes
1answer
31 views

changing host.. data loss

I changed my host from dreamhost to godaddy.. My menubar setup is not showing up.. all of the pages are visible when there is only supposed to be a couple visible .. the site is first in english but ...
0
votes
4answers
997 views

how to assign an ID to a wordpress menu

The following code does not produce a UL with ID of "nav". It just produces <div class="menu"><ul> This is the code: wp_nav_menu( array( 'theme_location' => 'menu-1', ...
0
votes
1answer
140 views

Prevent menu from loading in a page template [duplicate]

Possible Duplicate: Remove navigation from header in custom page template Is there some way to remove wp_nav_menu in a page template? I can't find anything related to page templates other ...
0
votes
1answer
45 views

Custom menu with different behavior for every item

I'm working on a custom menu that is particularly complex and I like to know which is the right way to build it. This is the structure of my menu: - Home (is a PAGE) - Information (Is a PAGE with ...
0
votes
2answers
478 views

wp_nav_menu() loses 'current-menu-*' classes on single product page within category

I have my menu set up like so: Shop Online (WPeC 'Products Page' page) Product Category (WPeC Category) Product Category (WPeC Category) Product Sub Category (WPeC Category) Product Sub Category ...
0
votes
1answer
71 views

I'm using wp_nav_menu to display my menu, but I want one more link in there that is a hardcoded link. How can I do this?

I want to have all my dynamically generated links in my nav menu, but the second last one should be a link to my "Work" for my portfolio, which is just a link to a section on my main page. (Anchor ...