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.
13
votes
2answers
12k views
How to use wp_nav_menu to create a select menu dropdown?
I'm using the following inside the wp_nav_menu function to create a select dropdown menu where each menu item is an option in the select dropdown...
'items_wrap' => ...
2
votes
3answers
6k views
Using Image Links in Wordpress Navigation Menus Instead Of Text Links
Does wordpress support the capability to use images in the navigation menus instead of text links? I searched for this capability and found a site that shows how to include images in the menu through ...
0
votes
0answers
28 views
How can I make a custom menu with images for each link?
I would like to have list of thumbnail images (which can link to pages) permanently down the left hand side of this site.
The idea will be to have a set of photos of the people who work on the ...
0
votes
0answers
37 views
Editing menubar by repositiong search bar
I am using a free wordpress theme named Pitch (http://siteorigin.com/theme/pitch/) . I want to edit the main nav menu . I want put the search bar into the menubar . I did it by editing CSS , changing ...
0
votes
1answer
42 views
Should the caching of WordPress menus be specific to each page?
Introduction
In optimizing large WordPress Websites for performance I always look at caching certain parts of the Website, mostly (of course) those that require a lot of Queries/calculation.
For the ...
0
votes
1answer
237 views
Limit the menu child levels under “admin > appearance > menus”
in my effort in making the WP backend as user friendly as possible, I'm looking for a way to limit the amount of child (or submenu items) of the menu(s) under "admin > appearance > menus". They idea ...
0
votes
1answer
64 views
Does the 'nav_menu_css_class' filter accept 2 or 3 arguments?
I've been using the nav_menu_css_class filter in one of my plugins, implemented as:
add_filter( 'nav_menu_css_class', 'wbwcrf_nav_menu_css_class', 10, 3 );
function wbwcrf_nav_menu_css_class( ...
0
votes
1answer
223 views
custom walker to add iconfont to wp_nav_menu
I want to add the font awesome iconfont to my menu list items, so I need to make a custom Walker.
Because the font per menu item will be different I was hoping to use the css class in the WP backend ...
5
votes
2answers
1k views
Display Menu Name using wp_nav_menu
I have a custom menu that I can call just fine using wp_nav_menu. Is there a way to have the menu name displayed inside an h3 tag before the menu?
Ex.
<h3>My Menu Name</h3>
<nav>
...
13
votes
4answers
5k views
Add 'has_children' class to parent li when modifying Walker_Nav_Menu
I'm writing a customised walker class for wp_nav_menu and want to be able to specify if an li contains a submenu. So I want my markup to be:
<li class="has_children [other-wordpress-classes]">
...
1
vote
1answer
51 views
custom walker nav issue involving ajax
I am using ajax in a theme not written by me. This ajax gets the link clicked and then slides that page into view. it works good. In order for it to do it's thing, I had to make a custom walker for ...
0
votes
1answer
45 views
Search form as list item in menu?
What is the best way to do this:
<?php wp_nav_menu( array('menu'=>'Primary',
'container'=>'',
'items_wrap'=>'<ul id="%1$s" ...
1
vote
1answer
63 views
Main menu highlighting on subpage which is not in submenu but in hierarchy
I have my menu made of images. Therefore I use divs and with .current-menu-item I use CSS to change the image. This works if I'm directly on this main page. If I'm on a subpage I cannot use this trick ...
0
votes
2answers
1k views
How to show only parents subpages of current page item in vertical menu?
I just can't find a way to make it possible to show only current parent items down to current page item in a vertical menu the "wordpress way".
What I want to achieve is the following dynamic ...
5
votes
5answers
318 views
Add separator to admin submenu
I would like to add a separator to the admin submenu section, NOT in the top level section.
I'm thinking of using javascript and styling to do the job, but I was wondering if there's a more ...
0
votes
2answers
133 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
1answer
84 views
Container class not appearing on navigation menu
I want to render a menu with a container like this:
<nav class="nav">
However, the container is just rendering with the default class name applied which I don't want.
<nav ...
0
votes
2answers
46 views
Cannot seem to replace the native menu with the menu I created, so 2 menus appear
Helping a friend w/ a navigational menu on a WordPress PHP site -- called it Primary Menu. I'm trying to override the default navigational menu with the jquery-mega-menu I created in the widget area ...
12
votes
2answers
9k views
Customizing Only a Specific Menu using the “wp_nav_menu_items” Hook?
Thanks to some help on here, I've managed to add a custom search box to my main menu... by adding this to my theme's functions.php
add_filter('wp_nav_menu_items','search_box_function');
function ...
0
votes
2answers
95 views
WP Nav menu append to url
Using wp_nav_menu() , how can I append a value at end of each URL?
For example, I have the following url: http://www.example.com/ but I have to append a language parameter at the end, so the url ...
0
votes
1answer
420 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
85 views
Remove first separator in wp_nav_menu
I am using following code to get my menu.
My problem is Span is not getting added and I want to remove the first separator.
<div id="sub_nav">
<?php $menuParameters = array(
'container' ...
0
votes
2answers
44 views
WP Nav Menu: String replacements
I have a short function to clean up the WP Nav Menu.
add_filter('nav_menu_css_class','strip_classes');
function strip_classes($a){
return (in_array('menu-item-71',$a))? array('contact') : ...
-1
votes
2answers
76 views
Wordpress menu links with images & class selection
<ul>
<li class="selected">Link 1<img src="images/slash.png" /></li>
<li>Link 2<img src="images/slash.png" /></li>
<li>Link ...
1
vote
1answer
836 views
Bootstrap drop down menu with wp_nav_menu
I am trying to build a Wordpress theme with boostrap, but the nav menu is giving me some trouble. I would like the dropdown to work like boostraps dropdown, but I do not know how to do this.
This is ...
-1
votes
1answer
183 views
Creating an accordion style menu
Is there any way to create a menu with dropdown list like the image below in WordPress ?
click to enlarge ⤴
Here, when we click on [+] sign the dropdown menu shows up, I can manage the CSS, but ...
0
votes
1answer
220 views
Custom Nav Walker menu - Display children count
I have a custom walker menu.( See the code below)
I would like to have my nav menu like this
----------------------------------
Home | link1 | link2 | link3 (5)
----------------------------------
...
0
votes
1answer
98 views
Nav Menu and display post count
Iam looking for a solution that the number of child post displayed, like so:
Parent (14)
- Child
- Child
Parent (2)
- Child
I have played with the custom walker and tried the function with ...
0
votes
1answer
536 views
Tab menus with horizontal and vertical tabs [closed]
Has anybody seen more examples of tab menus like the one on this page with horizontal and vertical tabs?
http://www.hmag.com
I need to create a page with tabs where the tabs at the top are the ...
0
votes
1answer
111 views
How to change the menu color
I need to change the menu color of the wordpress 2011 theme to transparent.
this is the header
<nav id="access" role="navigation">
<h3 class="assistive-text"><?php _e( ...
0
votes
1answer
41 views
Can't remove menu items added by plugin
I am trying to remove menu items from the backend but for some reason I can't remove specific menu items added by plugins. For example, I can use this line to remove the plugins page and it works just ...
0
votes
1answer
79 views
Set default screen option for appearance -> menus
Is it possible to have any control over the screen options for Appearance>Menus. I am working on a theme and with a fresh Wordpress install where I had never touched any of the screen options ( at ...
0
votes
2answers
127 views
register_nav_menus, then create menus programatically
I have a register_nav_menus call in my theme's functions.php:
//register nav menu and footer nav.
register_nav_menus(
array(
'main-nav' => 'Main Navigation',
'footer-nav' ...
1
vote
0answers
25 views
Adding custom menu widget to sidebar programatically [duplicate]
I am trying to add custom menu widget to the sidebar. I am not working on wordpress directly, but I am using an xml-rpc calls to manage worpdress site (it is possible via ...
9
votes
7answers
6k views
Adding custom post type archives to a WordPress menu
Is there a way (besides adding a Custom Link) to add a custom post type archive to a menu in WordPress? If it's added using a custom link (e.g. /cpt-archive-slug/), WordPress does not apply classes ...
0
votes
1answer
1k views
3 Level Deep Navigation Menu Not Showing All Levels
I have a 3 level deep navigation menu which will show beside all pages on the site except the homepage. The issue is only 2 of my 3 levels are showing in the menu when displaying it using the ...
-2
votes
1answer
103 views
Resolve the debugs
I enable the debugs, and i have these that describe below.
In the wp-config.php write :
define('WP_DEBUG', true);
define('WP_DEBUG', false);
1)
Notice: Undefined index: type in ...
3
votes
3answers
370 views
One site, 2 distinct sections: two different top nav menus?
I have a site that is in two distinct halves. I'd like the same template to apply to the whole site (from a look & feel perspective), but for each 'half' of the site to have its own top nav menu. ...
0
votes
2answers
112 views
Change class-name on “current_ancestor” in wp_nav_menu
Im working with a project where i want the wp_nav_menu to output other css classes for current_page, current_ancestor and remove other stuff like page-id and menu-id.
I have get some stuff working ...
5
votes
1answer
326 views
How do I add nested categories to drop-down menu in twenty-eleven?
I know how to do it by writing a separate ul/li css for wp_list_categories, but I find menus of "twenty eleven" already well designed and flexible, so I`d like to use them.
Custom menus, when I have ...
3
votes
2answers
634 views
Use wp_nav_menu() to display a Menu from another site in a Network install?
So I'm basically upgrading an older site and I need to make it multisite as well for some blogs and such.
I'd like to have the main site Menu(created from the admin) available on the other sites in ...
0
votes
1answer
62 views
Removing Submenu from Menu
Thesis appears to automatically add the sub-menus (sub-menu ul) to menu parents if childs exists. I have a specific need to remove this html from a particular menu.
The menu name is: second_level
...
0
votes
1answer
128 views
Recent Posts widget missing current_menu_item class
Unlike the (WP standard) Custom Menu widget, the Recent Posts widget does not add the current_menu_item class when a post is selected (being displayed).
This seems like a major oversight, am I ...
1
vote
2answers
163 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 ...
1
vote
2answers
923 views
How to change the admin menu “Pages” to something else
When one creates a custom post type you have the ability to define various elements related to that post type which essentially allow you to define things such as the menu title, "add new post" text ...
1
vote
1answer
61 views
Pulling Featured Images in to a WordPress Menu
I've got a simple static list marked up like this that I'd like to turn in to a WordPress Menu:
<ul>
<li><a href="#"><img ...
1
vote
1answer
37 views
do_action appearing outside of menu?
I'm using Bill Erickson's "Add Extra Code to Any Menu" function:
<?php
/**
* Add Extra Code to Any Menu
* @author Bill Erickson
* @link http://www.billerickson.net/customizing-wordpress-menus/
...
0
votes
1answer
49 views
Remove a menu item in menu
I know this has been asked many times. But from what i got after searching, i could not understand much. I have used wp_update_nav_menu_item to add menu items programatically. But i don't know how to ...
0
votes
1answer
198 views
How to change theme header to support multiple nav menus?
I'll try to be brief....
I have a theme that only supports one navigation menu. At this point I'd like to add 2 or 3 more menus. I have successfully registered my menus in functions.php with ...
0
votes
1answer
243 views
Using CSS ID's and Classes with images in a Wordpress Horizontal Menu
just found this marvelous website, so, I'm new in Wordpress.
I have a HTML/CSS website developed from a PSD file. Everything was going OK, Header, Footer, but when I came across the WP menu, I'm just ...

