Tagged Questions

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

“Automatically add new top-level pages” Default

I'm looking for a way to set the default "Automatically add new top-level pages" to be checked when creating a new menu. I haven't been able to find anything on this - any help you could give me? ...
0
votes
2answers
2k views

I am extending Walker_Nav_Menu: How can I get the number of children elements of the current item?

I am trying to extend the Walker_Nav_Menu walker to make some changes to the way WP outputs menus. The method I have to override is start_el, so I created my Walker and copied the base method: ...
0
votes
1answer
689 views

Superfish and WordPress: Active Color Problem

Take a look at: http://www.themeforward.com/demo2. When I hover over a menu item with a sub-menu, like 'Templates', and mouse over sub-menu items the background color stays the same as it should... ...
0
votes
2answers
669 views

How do i put a dropdown list of ALL my post in the sidebar menu?

In "Main Sidebar" i would like to add a dropdown list of ALL my post. How can i do that? I found various plugins and none of them did what i wanted (for example one only list the post i have on that ...
1
vote
1answer
1k 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 ...
0
votes
2answers
149 views

and custom post_types to custom menu

managed to create a custom menu area in the admin but now want to place 2 post types to it. They already exist - questions & answers, but can't find a way to put their menu links into the custom ...
22
votes
2answers
11k views

How to add a custom field in the advanced menu properties?

Is it possible to add a custom field to menu items? What I want to do is be able to add a field for 'French Navigation Label' and a 'French Title Attribute' in the wp menu interface.
2
votes
3answers
7k views

How can I show different menu for different pages?

I have a website that has a main menu(Top-Horizontal) like this: Main menu - Home - About Us - contact us On Home page I have a link to "Company" page like this www.xyz.com/company. When I am ...
3
votes
4answers
2k views

How to add current, parent, and ancestor menu item IDs to body_class()?

(just got reccommended to post this over here from stack overflow...) I am just starting with Wordpress (defecting from Joomla)- having a bit of difficulty getting started. One thing I am trying to ...
1
vote
2answers
515 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 ...
0
votes
1answer
494 views

Check if page has subpages

I'm try to build a menu with wp_list_pages() that must work like this: Main Page -Subpage1 -Subpage2 I check if the Page has_subpage and i can see the 2 subpages when i'm in the Parent ...
0
votes
3answers
691 views

Add extra menu to theme

What's the best way to add an extra menu location to a theme that already has one? I want to add an extra menu in a child theme of a theme that currently has a single custom menu (what is the correct ...
0
votes
1answer
1k views

Admin top level menu, pointing to an external url

I want to create a entirely new top level menu in the admin menu section, and have that be an external link, is this even possible with the current system? The solution that t31os provides in this ...
0
votes
1answer
346 views

how to remove description from menu buttons?

I just installed Wordpress into my server and I am currently using the "graphene" theme to test my wordpress blog. I have two pages in addition to the front page, which is "about us" and "sample ...
0
votes
1answer
6k views

How to show Home Page link in Wordpress Menu and how to add an icon to this?

I tried with this code: function home_page_menu_args( $args ) { $args['show_home'] = true; return $args; } add_filter( 'wp_page_menu_args', 'home_page_menu_args' ); but gives me this error: Error ...
4
votes
4answers
5k views

wp_nav_menu: show menu only if one exists, otherwise show nothing

I'm trying to use wp_nav_menu to only display a menu if one exists, otherwise, display nothing. If I delete the menu, it will output a list of the pages. My functions.php file contains: if ...
-1
votes
1answer
110 views

How can I alter the visible menu according to which level I am on [closed]

I want to be able to alter what is visible in the menu according to which level in the site structure I am on, for example on top level page:- Home Level 1 page (Current) -Level 2 page -Level 2 ...
5
votes
1answer
7k views

Display only page specific sub menu items using Custom Walker

I've just implemented the technique described at http://wordpress.org/support/topic/wp_nav_menu-list-only-2nd-level-separate-submenu/page/2 when implementing a theme for a client. When I run the theme ...
0
votes
2answers
20k views

How to Create a Custom WordPress Navigation Menu with the Code?

Without using plugins, how to create a custom WordPress navigation menu with the code? I have Wordpress ver 3.2.1 and Buddypress ver 1.5.1 I would like to create a menu. I would like to place the ...
2
votes
3answers
7k views

Show just one level of child pages, wp_list_pages woe

I'm working on a site that has a fairly large page structure a few levels deep - in some sections there are a lot of pages. The basic setup is something like this... Parent Parent Parent -Child ...
1
vote
1answer
180 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 ...
4
votes
2answers
6k views

Dynamically exclude menu items from wp_nav_menu

I tried looking for info about how to exclude/remove nav menu items from custom menus, and the only thread I found did not have any answers that were useful to me. 1. Background: I put together a ...
1
vote
1answer
585 views

wp-custom-menu filter removes the current_page_item class

After adding wp-custom-menu-filter plugin - to hide some menu items for not-logged in users, the current_page_item class disappeared from my menu. $item->classes in the walker is an empty array, ...
1
vote
2answers
1k views

Keep parent page active

I have a parent page on my main menu. When you click on that page, you are presented a sidebar with another menu listing of all of its child pages. When you click on one of the child pages, the ...
0
votes
1answer
1k views

wp_nav_menu: output featured image of each page listing

Context: I am building a portfolio index where I can sort the individual project links in my sidebar by priority of appearance. I've successfully done this using the wp_nav_menu(), where each project ...
0
votes
1answer
167 views

How to output all taxonomy links from a custom post type in a menu?

I made a custom post type called Product. And a taxonomy with the name 'product-category'. These taxonomies have pages where we show a list of the products that have that taxonomy. Now my question is ...
0
votes
2answers
251 views

Remove the current item from a menu

I have a menu. It has two items: the first is a link ("Index", www.domain.com) the second one is a link to a category page I have the requirement to remove the first link when I'm on the index ...
0
votes
1answer
9k views

Custom Post Types in the WordPress Navigation Menu

Hello can someone help me out by pointing me in the right direction as to where I can find out how to add a drop down menu to a theme with my custom post types stored within in, have been ...
3
votes
3answers
2k views

How do I pass an argument to my custom walker?

I've set up a custom walker, and it works as desired when I hard code my variable. What I want is to be able to call my walker and pass it a variable that is used in the walker. For example: ...
0
votes
1answer
115 views

Parent/Child pages

I find that the parent/child pages in the "Pages" area of WordPress has become a bit confusing since the introduction of the new menu creation area. Using the new menu system, as far as I know I can ...
0
votes
1answer
579 views

Menu that shows months and filters posts to show only posts from that month and shows posts as sub items

I've created a custom post type called news. On the page that shows all of my news posts i need to have a menu on the left side (sidebar) which shows months, i.e. October 2011, September 2011 and so ...
1
vote
2answers
256 views

Menus, but not by theme location

I'm trying to figure out how to display a menu that has been created, but without having to assign the menu to a theme location. From what I can tell, you have to assign a menu to a theme menu ...
0
votes
1answer
309 views

What is the current page's Taxonomy?

I need to be able to switch between the current page taxonomy so I can load in the appropriate menu: $current_tax = 'need to get this from somewhere'; switch ($current_tax) { case 'tax1': ...
-1
votes
2answers
897 views

Auto add pages to category menu

I have created a custom post type called Products, on the product pages i have a menu in the left sidebar. This menu is made up of categories for the products. Is it possible to have my products ...
1
vote
3answers
2k views

How to add meta box to backend menu page

I need to add a meta box to the backend menu page, in Appearance->Menus (/wp-admin/nav-menus.php), to list all the available post types, both the defaults & the custom ones. It will contain a ...
7
votes
4answers
22k views

How make top level menu item not have link, but have sub-menus that are linked?

I'm building a horizontal menu and some of the entries on that menu will have dropdowns (sub-menus), and some won't. Those that have sub-menus are not actually pages. They're just meant to be guides ...
0
votes
2answers
916 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
2answers
879 views

Conditional custom menu?

I'm trying to create a custom menu that displays a <li></li> when a user is logged in, and not display it when they're not. I have this so far, but it's not working. Does anyone know how ...
0
votes
2answers
177 views

New custom menu created. how to apply it?

i have a childtheme from twentyeleven, i created a 'inicio' (name) custom menu, how can I apply it? tried: <?php wp_nav_menu( array( 'theme_location' => 'inicio' ) ); ?> but not ...
2
votes
4answers
3k views

Adding a class (arrows) to main menu links that have children?

I'm wondering if it is possible to add different classes to second/third/fourth/etc-level items that have children in Appearance > Menus tree? That's how I call the menu: <?php $menu_args = ...
2
votes
1answer
2k views

Add meta data to the menu

I encountered this problem what i thought to be one of the worlds simpliest things, I wanted to add a subtitle to the menu somethin alike this http://img4.imageshack.us/img4/7816/unled10b.png . Then i ...
0
votes
1answer
136 views

Editing the nav menu?

I want to add | (vertical lines) between the page links in the nav menu. What's the easiest way to do this?
1
vote
1answer
536 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 ...
0
votes
2answers
385 views

Is it possible to link to the same page from wordpress page menu?

I have a big one page wordpress site and a menu created from wordpress admin pages panel. I added everywhere in my main page such links like <A NAME="gohere"> and similar. Now I need to add ...
1
vote
1answer
1k views

Get menu object from theme_location

I'd like to get a menu object from its theme location argument. My goal is to output separately the menu name and its items name, url and description. Example of what I'm looking for : $menu = ...
0
votes
1answer
507 views

.current_page_ancestor broken in Twenty Eleven

I would like to have a level 1 menu in a vertical menu and a full menu in a vertical menu in the left sidebar in Twenty Eleven. My problem is that I would like to make the top item bold if the user is ...
0
votes
1answer
1k views

How do I remove WordPress Custom Menus hover event and replace it with jQuery onclick?

I am using the WordPress (Appearance > Menus) feature to create a custom navigation menu. I created a menu item that has a dropdown and would like to activate the dropdown menu with a click rather ...
2
votes
2answers
5k views

What's the easiest way to duplicate an entire navigation menu?

What's the easiest way to duplicate an entire navigation menu? I don't care if it involves SQL commands or whatnot. I just have some really big menus that I'd like to duplicate. Didn't see a plugin to ...
1
vote
1answer
79 views

Custom menu deletes itself

I've set up a menu on one of my sites. The menu has ~30 items. Everything is fine, but at some point the menu crops itself and displays only the first 12 item. Does anyone have an idea why this is ...
5
votes
1answer
709 views

Custom Post Types posts as submenus in Nav Menu

I have created a Custom Post Type called "Collections". I'd like to have in the Nav Menu (no custom menus involved) a menu item 'Collections' that links to the index page of Collections Custom Post ...