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
1answer
46 views

conditional: if is page, and all subpages

What I'm currently trying to achieve is displaying certain menus on certain pages using one template and conditional statements, like so: if (is_page('donate')){ wp_nav_menu(array( 'menu' ...
0
votes
1answer
195 views

wp nav menu: show submenu below li item

I'm trying to figure out if it's possible to show the submenu's outside of the relevant li tag. For example, this php: wp_nav_menu(array( 'menu' => 'side', 'container' => false, ...
0
votes
1answer
3k views

wp nav menu: add attributes to menu items [duplicate]

I'm trying to figure out if it's possible to attach an attribute to a wp nav menu item. To demonstrate, this php: <?php wp_nav_menu(array( 'menu' => 'main', 'container' => ...
0
votes
1answer
335 views

How can I make a menu link visible only to admins (without plugins)?

I use a menu on top of my wordpress which shows 3 links. Main page Custom Page Custom Page Can I add a 4th link to my menu which is visible and accessible to admins only (without plugins)? This ...
0
votes
1answer
188 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
925 views

How to list recent posts in a wp nav menu?

I've been trying this for some time and didn't get no clear answer. I need to display 11 recent posts inside one of my menu items. My menu is like: ITEM 1 · MAMBA · ITEM 3 I need to display ...
2
votes
1answer
1k views

Error “Trying to get property of non-object” with Custom Walker for wp_nav_menu

I am trying to add some ARIA related stuff to the wp_nav_menu function. I use a custom walker class for this purpose: class Walker_Nav_Menu_With_Aria extends Walker_Nav_Menu { function ...
0
votes
1answer
455 views

Getting (Invalid) when adding custom taxonomy of custom post type link in menu [closed]

I am getting this message when I am trying to add a link to my menu: I have created a custom post type and a custom taxonomy <?php /* Plugin Name: Portfolio - Custom Post Type Plugin ...
-1
votes
1answer
747 views

wp nav menu - highlighting current page not working properly [closed]

I'm trying to highlight the current page in the wp nav menu. I've read through the codex and found .current-menu-item, which I'm using in my CSS.. However it's not working. What am I missing? css ...
0
votes
1answer
33 views

Cannot find Home link in Pages on Dashboard

I cannot see the Home page link in the WordPress menus section. Here's how the Pages box look like this: How can I get the link of Home?
1
vote
2answers
89 views

How can I add text to a single nav menu item?

I'm working on a theme that requires the end-user to specify the current performance season using a custom admin panel I've created, ie. "2013/2014", "2014/2015" etc., which I can retrieve using ...
0
votes
1answer
60 views

Remove link from Page name in navigation bar

I have a wordpress site and there is a navigation bar with menu and submenu. I want to remove link attribute from menu items that have sub menu. Is it possible? because i couldn't achieve to this by ...
1
vote
1answer
283 views

Displaying different page links on different pages

I have a wordpress site with 100+ pages. Now suppose 5 pages are related to page 1, and I want to show them in side bar as similar pages/related pages and other group of pages in other menu in ...
0
votes
1answer
120 views

Highlight wp_nav_menu when category is selected

Using the wp_nav_menu() function to display my menu I noticed the highlighting in the menu was working well for the pages I created (like archives.php) but not anymore when a date (date.php), category ...
0
votes
1answer
23 views

How to tell if a user has gone in and created a menu

By default if a user has not created say a footer or a top level menu then WordPress, in the case of the footer, will use default content like pages and so on to "create" a menu. I don't want this to ...
-2
votes
1answer
98 views

How can I structure my pseudo footer nav code with wordpress codex code?

I'm building my first fully custom wordpress theme, and I'm starting to pull hairs out while trying to write the dynamic footer code! I've tried a bunch of codex this and codex that but can't seem to ...
0
votes
1answer
190 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
0answers
22 views

adding parent link to submenu [duplicate]

menu a link to its parent, for example: I have the following menu: Parent 1 - Child 1 - Child 2 - Child 3 I wish to add to it (on the fly, not throw the wordpress cms) link to the parent: ...
0
votes
1answer
282 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
1k views

Sticky menu for WP custom menubars

This seems simple, except that I am not able to figure it out. In a wordpress theme, how can I make a custom menubar below the header image stick at the top after scrolling down the page? Example ...
0
votes
3answers
517 views

Does is_child() exist in wp 3.5.1?

I'm trying to figure out how to get to a is_child() equivalent; I'd like to be able to target the parent page and it's children. How can this be achieved? My pseudo-code is... if ...
0
votes
1answer
126 views

How can I change the title of the Home link in the navigation bar?

I use Bones theme with a static front page. The header.php calls the bones_main_nav() function without parameters, while bones_main_nav() only calls the wp_nav_menu() function.
0
votes
2answers
40 views

switching test to production > main menu forgotten, background forgotten

the bigger question is: How to have a beta (test) site and production, and switch between them so easily that a user can do it. I wrote a script that does the move. Here's what the script does: 1. ...
0
votes
0answers
39 views

Getting recent posts corresponding to category items in custom menu

I'm trying to create a tabbed navigation, each tab containing 5 recent post excerpts of category items that are listed in a custom menu. I'm planning to load all these posts at once and put each ...
0
votes
1answer
1k 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
3answers
323 views

Adding first and last class to Menu on top level only

I'm using a WordPress Menu to create a navigation structured like this: Home About Contact Sub Page Using this code from kuroi's response here I'm able to add first-menu-item and last-menu-item ...
1
vote
1answer
952 views

Renaming a WordPress Admin Menu

I am trying to change the Admin Menu name for "WooCommerce" to "Store Settings". I tried the other code rename posts to articles, etc. but it did not work for WooCommerce. WooCommerce's Admin Menu ...
0
votes
1answer
2k views

Add custom attributes to menu items without plugin

I'm trying to figure out the best way to add custom menu attributes without using a plugin. I have a site using a custom theme and need to make sure this is setup at theme activation vs needing to ...
1
vote
1answer
134 views

Set Item Order with wp_nav_menu_{$menu->slug}_items

I have some code that adds a menu item to a menu using wp_nav_menu_{$menu->slug}_items. It's pretty easy to add a menu item as the first or last item of the menu, but I was wondering if there's ...
2
votes
2answers
610 views

How to add post count to wp_nav_menu?

Is it possible to add post count to menu links using wp_nav_menu? For example:- Apple (3) ball (6) cat (2)
0
votes
1answer
336 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
52 views

Adding Pipes to Menu Output

My client has a menu like this image below that I am trying to re-produce for them as a WordPress Menu... My first attempt so far was to utilize the after parameter option for the wp_nav_menu. ...
0
votes
1answer
38 views

How we show pages in dropdown

I show the all menu which i have on the top in dropdown style when site is open in mobiles. I successfully display them in dropdown style but the problem is that how can i indend my subpages. or make ...
0
votes
1answer
152 views

How do I move menu to the bottom in Custom Community theme?

I am new to Wordpress and created the following website: www.sugarhausbyamy.com I would like to move my menu to the bottom of the screen. Is there an easy way to do this? I would also like to ...
0
votes
1answer
41 views

Custom Menu based off custom header

I'm using my Child of TwentyTwelve Just for your knowledge, I have two sections to my one WordPress site... one is called pain, the other called anesthesia (It's a medical site for the curious). I ...
2
votes
1answer
146 views

Custom taxonomy position in admin panel

I can't figure out how to change position of custom taxonomy menu item in the admin panel. Right now I have custom post type-- custom_1-- and another custom post type-- custom_2. For custom_2, I've ...
0
votes
1answer
1k views

Custom Post Type .current-menu-item not applying on Custom Post Type Archive Page

I am working with custom post types and I had trouble with the nav menu not getting the .current-menu-item on my custom post archive page menu item. In fact, when I was on that page or any of the ...
0
votes
1answer
133 views

Hide pages depending on role

I've been trying to find a way to limit the user from seeing some pages in the "pages" menu in the admin panel. I looked in the edit.php file and noticed: } elseif ( 'page' == $post_type ) { ...
0
votes
1answer
117 views

Wrap wp_nav_menu output around option tags for select menu

I have set up a wp_nav_menu in Wordpress. I have 2 parent categories, with 2 sub-categories each, so this produces a nested list. My current code to call this menu is... <?php wp_nav_menu( ...
0
votes
1answer
61 views

changing the labels inside appearance -> menus for some for the fields

So I've create a custom walker for nav menu (i am talking about the menus located at: appearance -> menu -> add a new menu. I now use the following for several things i need: URL Title Attribute CSS ...
0
votes
1answer
50 views

Redirect url in plugin to somewhere else?

I am using WP-SNAP Extended! v1.0.0 and I want to use this alphabetical menu as a sub-menu beneath my header. I managed to get the alphabetical menu in place, but now, if I click on a letter, it will ...
0
votes
2answers
53 views

How do you return a menu with the menu name?

in functions.php, I've defined the following: register_nav_menu( 'home_blocks', __( 'Home Page Posts', 'my_Theme' ) ); In /wp-admin/nav-menus.php, I've added a menu called Home Page Posts and ...
0
votes
1answer
278 views

How to retrieve depth of menu into template

In wp_nav_menu i use for the menu, with custom walker, i can get the $depth parameter in the start_el function function start_el(&$output, $item, $depth, $args) but, outside this ...
0
votes
3answers
157 views

Move Sticky Nav Menu Below WordPress Tool bar when tool bar enabled

I've created a sticky menu but its hidden behind the WordPress Toolbar when logged in. How do i move it below the toolbar when enabled and logged in? I was looking for a conditional tag but couldn't ...
0
votes
1answer
298 views

Admin Menu Hack (Left side in Dashboard)

How can I add a Title to my Admin Menu on the left side of the dashboard? Not a link, but just a title? I want do this in my functions and not use a plugin. Also which template file handles this menu? ...
0
votes
0answers
25 views

Building Menus with the latest posts included

Im looking to build a menu system much like that off the huffington post or washington post, with links on one side and the latest articles or other dynamic content on another. Before i go crazy and ...
0
votes
1answer
56 views

wp_nav_menu: indicate by id page grandparents

I have an web site with top-header menu and sidebar menu. Situation, like: header menu: books music movies (if we are now under music) sidemenu: blues jazz dance (if we are now under "Jazz") ...
0
votes
1answer
163 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
0answers
41 views

WP_Nav Highlight Parent Issue

I'm trying to figure out how to highlight the parent nav of a page and becoming stuck. I've seen something like this : <li <?php if(is_page('services')) { echo 'class="current_page_item"'; } ...
0
votes
1answer
52 views

How Can I add a menu to the theme from withen the function.php file

I have the following code I'm trying to automatically add a menu to a theme via overriding a function. So I won't have to edit the theme file However the menu is being outputted at the top of the ...