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

How to make a plugin auto-add item to nav menu

I'm building a contact information plugin that writes data to a page. So far, so good. What I would like is to build a function into the plugin that adds a navigation item to the main nav bar on the ...
0
votes
3answers
254 views

Fake mark a menu item as current_page_item/active in Wordpress

I have a custom post type called Books and a page structure like this: Home Products & Services - Services - Products -- Books I am using Wordpress custom Menus for the 1st level navigation ...
0
votes
2answers
120 views

Replace the slug of parent pages with # [closed]

I'm creating a Wordpress site with a Superfish CSS3 / Jquery dropdown menu, complete with hoverIntent as displayed here: http://users.tpg.com.au/j_birch/plugins/superfish/#examples As far as I can ...
0
votes
1answer
35 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
156 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
640 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
294 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
262 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
735 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
2answers
550 views

wordpress plugin to add images to main navigation menu

Please advise about wordpress plugin to add multi states images to the main navigation menu I need to be able to add images on top of text for normal, hover and current state. Thanks
0
votes
1answer
4k 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
1k 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
157 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
455 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
608 views

How to develop a menu like wwe.com?

I would like to design and develop a WordPress menu like wwe.com's menu where it has multiple columns, images and a video section in drop down menus. I can create a multi-column menu, but I'm not ...
0
votes
1answer
1k 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
2answers
1k views

How to add nofollow to wp_nav_menu

I need to add an option in my theme options panel to set a specific custom menu's links all to nofollow. Does wp_nav_menu() allow this or does it require a custom walker to manually ad ...
0
votes
1answer
245 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
152 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
447 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
198 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
156 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
376 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
51 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
893 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
1answer
1k views

Overriding the currently selected menu item

I have a WP 3.x site that I'm using mainly as a CMS. The menu links to the various WordPress pages. One of the pages, "News", is the "posts" page. However, when clicking on one of the posts on the ...
0
votes
1answer
794 views

How can I remove the “updates” menu in the Wordpress Admin panel?

How can I remove the "updates" menu in the Wordpress Admin panel?
0
votes
4answers
1k 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
614 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
497 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
994 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
286 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
5k 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
174 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
335 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
978 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
904 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
161 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
100 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
432 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
308 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
525 views

How can I automatically add child pages to pages in a WP menu?

In the WP menu creation GUI there's the Automatically add top level pages option. I would like to do the opposite, for any page that is in the menu, automatically add it's child pages. Is there a way ...
0
votes
2answers
2k 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
492 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
297 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
190 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' ), ...