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
198 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 ...
0
votes
1answer
40 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
205 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
2answers
1k 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 ...
0
votes
1answer
373 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
290 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 ...
0
votes
2answers
1k views

Insert a div before the wp_nav_menu

How do I go about inserting a custom div before the wp_nav_menu() adds the ul? The problem is that the script is inserting my 'div menu button' after the nav ul instead of before it. I am trying to ...
0
votes
1answer
5k views

Automatically Display Sub Menu

To start... I am new to Wordpress and developing themes. I've got a main menu which I've placed in my header using the following code: <?php wp_nav_menu( array( 'theme_location' => 'primary', ...
0
votes
1answer
2k views

show current item in custom menu, when inside a custom post type

I have a custom post type "product". I need to have its index accessible from the main menu, so i 've added a Custom Menu entry, simply stating "/works/" as url value. Problem is: if i'm looking at a ...
0
votes
1answer
165 views

add_filter for where statment issue

I am trying to get start and end dates for posts filtered, and I found the documentation for the 'posts_where' filter, I am just testing it so far, but when ever I add the filter, it seems to pull in ...
0
votes
2answers
644 views

Edit the (automatic) HTML layout of nav menus

I registered my menu in functions.php, called it from header.php and set it all up in the Appearances > Menus backend. The problem is, I need to manually insert a div surrounding <ul ...
0
votes
1answer
3k views

Placing widget to menu

is there any way to display widget in menu. Actually what i want is "site stat" in the menu. (black area) At the right. link
0
votes
2answers
2k views

remove class “sub-menu” from wordpress drop down menu

I am building a wordpress website with dynamic wordpress menu + one level drop down menu (sub menu). since my drop down is a bit tricky and required special CSS I tried to remove the styling that ...
0
votes
1answer
299 views

exclude pages in custom menu

I am creating a custom theme for wordpress, which will have a settings page. i am adding the option to exclude pages from the navigation, which will simply work on the page id separated by a "," here ...
0
votes
2answers
174 views

Adding an external link to wordpress menu

I am currently using wordpress menu like this ... $args=array('menu'=>'menu', 'menu_class'=>'', 'before'=>'<span>', 'after'=>'</span>', ...
0
votes
1answer
530 views

How to make wordpress nav menu use post custom meta data

Using WordPress custom navigation menus automatically gets the menu item label and displays it between the of the menu item, what I need to do is to get a custom field value of the page and displays ...
0
votes
1answer
225 views

Give Children Unique ID's

Is there a way I can give each wordpress children (subcategory UL lists) unique ID's? I'm creating a dropdown list for subcategories and I want to position them but :nth-child isn't supported by ...
0
votes
1answer
21 views

Is it possible to make the heading on a page different text to the text of the menu item?

Is it possible to make the heading on a page different text to the text of the menu item? I have a page with a very long title and I'd like to make the clickable menu text shorter. Site is here: ...
0
votes
2answers
160 views

Change div background acording to the selected category

I'm coding a graphic menu that consist in five divs with a background each. On mouseover the background changes and the child div disappears. On click, each one works like a link to the correspondent ...
0
votes
3answers
458 views

How to Structure Pages and Subpages

I'm trying to create a church site using WordPress. The following is a small sample of the page structure I'm trying to create: About Staff Statement of Faith Contact Ministries Furnace Prayer ...
0
votes
2answers
52 views

Adding new pages to Menu

I am new to Wordpress. I am using the free Theme for my blog. I have added Menu as About Us, Contact Us, Groups etc .. I need to add Static Pages to About Us, Contact Us etc ..!! I dont know to How ...
0
votes
1answer
1k views

Custom Post Type & Custom Menu Walker to append custom class for active post types

I have an interesting problem I am trying to solve here regarding a custom nav menu. Essentially, I have created a custom walker class for my nav menu and I have manually added a menu entry directing ...
0
votes
4answers
2k views

Hide menu items for visitors and filter based on role

In my menu i've got some menu items that i don't want to show to people who aren't logged in. One of these i only want to show to logged in users of a certain roles the other to everyone logged in. ...
0
votes
2answers
672 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 ...
0
votes
3answers
736 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
348 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 ...
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 ...
0
votes
1answer
339 views

Can't insert internal links and menu errors appearing

I'm getting this error every time I add an item (page, post or category) to my menu system: Warning: Invalid argument supplied for foreach() in ...
0
votes
3answers
2k views

Way to bulk delete menu items in new 3.x Appearance > Menus system?

I've done some searches but maybe I'm searching on the wrong terms. Does anyone know if there's a way to bulk-delete menu items in the new Appearance > Menus system? This is mostly to clean up ...
0
votes
1answer
1k views

WordPress menu with custom taxonomy

I'm looking for a scalable, best-practice way to do the following: I need a menu to have a link to the homepage, a standard page, and a variable number of custom post type archives. Each archive must ...
0
votes
2answers
2k views

Add section (add_settings_section) to a custom page (add_submenu_page)

I have a plugin page created with add_submenu_page. I want to add a new section there but nothing happens: add_submenu_page('parent', 'Foo', 'Foo', 'manage_options', 'foo-settings', ...
0
votes
2answers
167 views

How to list only root pages?

I want to show only top level pages, without the dropdown. I am trying to set the depth to 0... wp_nav_menu( array( 'theme_location' => 'primary', 'depth' => 0 ) ); But it generates: ...
0
votes
1answer
102 views

Highlighting top level link when viewing one of it's sub-pages, which are not linked in the menu

I have a page that is not linked in my custom menu. This page has a parent page, which is linked in the custom menu. If I go to the "not-linked" page, I want to to highlight it's parent page link in ...
0
votes
3answers
467 views

Dropline menus — seperators between children only?

I'm working on a custom dropline menu using wp_nav_menu. Using wp_nav_menu( array( 'theme_location' => 'primary', 'after' => '|' ) );, I can put separators after every item. However, I'm only ...
0
votes
4answers
320 views

How to set classname for <li> tag in wordpress menu?

I am using. <?php wp_nav_menu($args); ?> to get menu from WordPress. It returns the menus with <ul> and <li> structure. How can i set class name for every <li> tag ...
0
votes
1answer
428 views

wp_nav_menu and its fallback

When I use wp_nav_menu(array( 'theme_location' => 'mainnav', 'container' => 'nav', 'container_id' => 'mainnav', 'container_class' => 'clearfix', 'depth' => 4 )); ...
0
votes
2answers
3k views

wp_list_pages sort order by custom nav menu order

Does anyone know of a way to create a sitemap by using wp_list_pages and have the order by the same orders a custom nav menu?
0
votes
3answers
517 views

Page menu with one image link instead of page title?

I have the following code generated by wordpress for my nav1: <div id="nav1"> <ul class="menusm"> <li class="page_item page-item-6"><a title="Inicio" ...
0
votes
2answers
1k views

Make menu items open in new tab/page

How do I make menu items open in a new tab/page instead of replacing the current page?
0
votes
1answer
368 views

Do not hyperlink menu heading

How do I make a menu entry that's just plain text, not a link? My kludge workaround is linking to "/", but I'd prefer no link at all.
0
votes
1answer
202 views

Can't display custom menu using name?

I want two menus using the new WordPress 3.0 feature. In functions.php I have: function register_my_menus() { register_nav_menus( array( 'header-menu' => __( 'Header Menu' ), ...
0
votes
2answers
5k views

how to hide submenus for the not active pages

I would like to expand only the active part of the sidebar menu and hide the parts which have nothing to do with the actual selection. Just like how its done on every Explorer like file manager, or ...
0
votes
1answer
1k views

Menu page with minimum capability as 'Subscriber' doesn't allow 'Admin' to access it?

I've added a separate menu page (an object page) with minimum access level required as 'Subscriber'. I'm doing this because I'm registering new users and they'll be 'Subscribers' with an extra ...
0
votes
1answer
91 views

Prevent custom post type from showing up in custom menus

How do I do that? Any custom post type I register shows up as a meta box on the menu page...
0
votes
4answers
5k views

List WordPress Custom Menu's active parent level's children as separate menu

I have a structured Custom Menu: parent 1 children1_1 children1_2 parent 2 children2_1 children2_2 parent 3 parent 4 children4_1 etc. I want the following: on every page, the parent ...
0
votes
3answers
933 views

WP navigation list classes

I'm using this code to display my menu: <?php $menu_args = array( 'container' => '', 'menu_class' => '', 'menu_id' => 'main-menu', ); ...
0
votes
2answers
1k views

Sitemap Page build from Menu?

Is there a plugin available that creates a sitemap from the default menu, e.g. as shortcode or requestbale URI?
0
votes
2answers
1k views

confused about wp_list_pages() function - how to display selected top pages with all their subpages

I'm a bit confused about wp_list_pages() function. Lets say I have 3 top level pages (with no parent) and each of them have some sub-pages: page 1 [sub-pages: 1.1, 1.2, 1.3]; page 2 [sub-pages: ...