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)

2
votes
1answer
422 views

Nav Walker current menu item not displaying

I'm building a theme on top of a starter theme (wp-bootstrap) and am having trouble getting the Nav Walker to show the current menu item. current-menu-item is not there when I use a web inspector on ...
0
votes
1answer
160 views

How to get or know the slug of home.php

I found this code from Different Main Navigation per category: <?php if(is_category('first-category') || in_category('first-category)) { wp_nav_menu( array('menu' => 'First Category Nav' )); ...
1
vote
0answers
66 views

Creating Category Specific menus

I have a question.. I am trying for this since many days.. but didn't get success. My requirement is say I have 5 categories: cat1, cat2 cat3 cat4 cat5 Now each of category has 'N' number of posts.. ...
0
votes
1answer
279 views

How to display conditional-content if wp_nav_menu( $args ) retruns something

I have a sidebar that displays child links of the current page (using this solotuin by http://wordpress.stackexchange.com/a/2809/27414) which works perfectly. If there is child links to be displayed ...
1
vote
1answer
37 views

Possible Menu Hack?

This is the craziest WP issues I've ever had...so my homepage main navigation reads like so...."home" "official artwork" "my artwork" "about" "links" "contact" but when I click on any other page my ...
0
votes
1answer
104 views

Using _s theme, menu changes do not affect header menu

I'm using the _s theme and seeing the header menu point to 'Home' and 'Sample page'. in functions.php, we have register_nav_menus( array( 'primary' => __( 'Primary Menu', 'mytheme' ), ...
0
votes
1answer
65 views

Function Reference for custom link in Admin Menu Management Page

What is the function reference for the text within the URL field in the Admin Menu page? I have a PHP function that is utilizing the_content function reference to look for specific file paths and ...
0
votes
1answer
61 views

Is there an action for save_menu and/or update_menu?

I want to "save" my menus into transients. I want to update those when there's been any changes to the menus via the admin custom menus. I've looked for an action but can't see to find anything. ...
0
votes
1answer
560 views

Display all submenus

For a custom jquery menu I'd like to show all submenus and hide / show each on demand. However my problem is to show all submenus in the first place. As of now I am managing the first level through ...
0
votes
1answer
277 views

define css class in functions.php

In my theme I use theme options to set colors to categories (heading colors, dividers colors etc etc) The way I do it is defining variables which holds a color hexa like so: $category1_color = ...
0
votes
1answer
76 views

How to add menù section to my WordPress template?

I am pretty new in WordPress blog and I am developing a blog with this template: http://scorejava.com/wordpress351 As you can see at the top of the page there is a "menù" that only show the page in ...
0
votes
1answer
65 views

Showing Custom Menus in the sidebar

I want to get custom menu in my top level page and the sub pages which are not child of the top level pages. I got many examples using wp_list_pages but it requires the sub pages should be the child ...
0
votes
1answer
84 views

wp_nav_menu - Collapse with PHP

How can wp_nav_menu be used to collapse and expand elements with PHP? Some walker function? Plugin maybe? What it looks like in wp-admin menus About Customers Cases Contact Contact us ...
3
votes
1answer
2k views

Adding category ID or slug to WP Nav Menu

Is it possible to add the id or slug of a category in the output of wp_nav_menu menu's? For example, the standard output of wp_nav_menu is: <div class="menu-header"> <ul ...
0
votes
2answers
82 views

How to add a page to header that is outside of WordPress?

I have a page on my site that is not a page in WordPress. How can I add it to the header? EDIT: The page is .php. It is outside of the theme structure.
0
votes
2answers
1k views

replace current_page_item class in menu

I want to replace below class with active class in menu: .current-menu-item and .current_page_item I am already using a menu callback which add a class dropdown in child menu: class ...
1
vote
1answer
1k views

How do I hide one menu item link for logged in and logged out users [closed]

Using bbPress and s2Member, I need to hide the registration link in the menu for logged in users and the members directory link for non logged in users.
0
votes
2answers
963 views

How to add active class to separate page link?

I'm using the Wordpress Bootstrap theme as my base theme. It uses the following code to add the class "active" to any links in the header if the user is currently on that page: ...
0
votes
1answer
147 views

Get current menu item label for specific parent menu [closed]

I have one custom menu in theme. You can see Buying menu have child archive page. i.e Active Listing. So what I want to do is at the top of the archive page for buying I want to display menu label. ...
0
votes
3answers
576 views

How can I disable sorting/dragging of a menu item in the custom menu admin?

I think my problem is partially a javascript problem, but if someone knows of a better way to do this I'd love to hear it. Basically the goal is to "save the client from themselves" by not allowing ...
0
votes
1answer
462 views

Where would I find Custom menu attributes in the database?

In what table would I find the title of a custom menu in MySQL for Wordpress 3.5.x?
0
votes
1answer
672 views

How to get current pages menu text?

Is there an easy way of outputting the current pages menu text? I am looking for something like <?php echo get_the_title(); ?> But for the current pages menu text.
2
votes
1answer
744 views

How to register custom menu widget

I'm trying to register a custom menu widget programmatically with wp_register_sidebar_widget, but it doesn't appear in wordpress. I'm using remote call of that method (xml-rpc). Referring to codex I'm ...
-1
votes
1answer
307 views

Creating a Horizontal menu

i'm new to creating wordpress themes and want a menu at the Top of my page. I do have the following: Header.php <html> <head> <title>Tutorial theme</title> <link ...
0
votes
1answer
490 views

Costum walker with sub menu item count

I have a menu like: -Item1 --Sub1 --Sub2 --Sub3 --Sub4 --Sub5 --Sub6 -Item2 -Item3 and want to do some costum stuff after x subitems, so I have to determine when x is reached. I tried to define a ...
1
vote
2answers
160 views

Grey out nav buttons unless is_user_logged_in()

I'd like to show my users some features I offer if they register in a special nav bar. I've created this for a logged in version and a logged out version: if ( is_user_logged_in() ) { $menu = ...
2
votes
1answer
171 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 ...
2
votes
0answers
174 views

Warnings in nav-menu when visiting query pages

Using query-wrangler, similar to drupal's views, I created some query pages. When I visit these pages, in the top-navigation-menu there is this warning: Warning: in_array() expects parameter 2 to be ...
0
votes
1answer
211 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
86 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
622 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
94 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 ...
0
votes
1answer
398 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
447 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
2answers
70 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
106 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 ...
2
votes
1answer
4k 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
335 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
951 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
463 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
270 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
84 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 ...
1
vote
0answers
29 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 ...
0
votes
2answers
1k 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
1answer
436 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
1answer
231 views

who to limit number of li in wp_nav_menu

need help regarding wordpress navigation i am using if ( has_nav_menu( 'main_nav' ) ) { wp_nav_menu( array('menu' => 'guest menu' )); } from back end if i keep the menu empty(do not any ...
1
vote
1answer
536 views

Primary navigation menu & footer not showing in category / tag page

I tried to find a solution for primary navigation not showing in some pages, ie. archive.php. I found one from here but it's still giving me notices. I'm using Reverie Theme in WordPress ...
0
votes
1answer
209 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
2k views

How to open a lightbox form from a navigation menu item

I want to add a custom menu item to the main navigation menu, On clicking this item I want to open a lightbox form. I have the form-shortcode ready to be placed but on a page but I don't know how to ...
0
votes
2answers
189 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 ...