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 (6)

0
votes
0answers
8 views

Why does <li class=“default-menu”> appear? I'm trying to remove a generic link called navigation on my main menu

I really didn't know where else to turn to. It really seems like major overkill to have to manually set class=default-menu to display:none and twice as much ditto to build a filter on functions.php ...
0
votes
2answers
427 views

wp_nav_menu add class to child item with sub child

I need your help, am trying to add class dropdown-submenu to a <li> element which has children. Not sure if I was clear enough, so here is an example: |-Home (Parent Item) |-Services (...
1
vote
1answer
61 views

Get number of root elements in walker class

I extended Walker_Nav_Menu class as below class YPE_custom_navwalker extends Walker_Nav_Menu{} I want use the get_number_of_root_elements( $elements ) function that place in to Walker class within ...
0
votes
1answer
72 views

Adding custom fields to Wordpress nav menus

I'm added new custom checkbox field to the nav menu items. the check box added without any problem when i check it it's work but when i want uncheck it not work and stay in checked state. the code ...
-2
votes
2answers
148 views

Hamburger Navigation Menu

I have a Wordpress menu that I am using as a Hamburger menu for smaller mobile devices. Since there really isn't a "hover" event for touch devices, I have changed the main menu items to show their ...
0
votes
0answers
35 views

Issue in adapted Twentyfourteen-child Functions.js (add toggles)

I am trying to add one (and maybe more) toggle buttons and menus on a Twentyfourteen-child theme. As the behaviour of search toggle is defined in twentyfourteen/js/functions.js I copied and adapted ...
1
vote
1answer
44 views

Where am I doing wrong in my theme menu?

Every thing works fine out of WordPress but the theme's dropdown menu doesn't work. Here is my functions.php code : register_nav_menus(array( 'primary' => esc_html__('Primary', 'codeha'), ));...
0
votes
0answers
63 views

Admin Custom Menu Editor Disappeared

The custom menu editor on my site has disappeared. It used to be under the Appearance menu. Any idea where to find it, or how to fix this problem?I have registered and init the menu properly in theme ...
0
votes
0answers
260 views

Extending Nav walker with Yamm menu

Here is my navigation code where only service tab should have col wise layout of menu. I am using bootstrap nav walker menu which is working fine for other nav except services menu which should have ...
1
vote
1answer
22 views

Blog Posts in Custom Menu

I have a custom menu but would like to put specific posts on each one. for example: my menu consists of: cooking, beauty and style. How can i put all cooking posts on the cooking tab, and all beauty ...
1
vote
1answer
27 views

Custom menu output

If the menu is with Pages then how can I display the menu item links like this: http://example.com/#/page/id I want to use the menu with Angular routes. I believe this can be done with a custom ...
3
votes
1answer
50 views

Programmatically adding menu items function replicates in multiple menus

I have the following code: add_filter( 'wp_nav_menu_objects', 'dynamically_add_shop_categories_to_submenu' ); function dynamically_add_shop_categories_to_submenu( $items ) { $...
3
votes
1answer
144 views

How to call “page specific menu items” in template

I have installed a plugin for giving custom command for menu to display on each Page Specific Menu Items, now I need to display these menus on theme header. Can I use anything like wp_nav_menu(). ...
1
vote
4answers
7k views

How to create a category menu?

I am new in WordPress world (before now I always used Joomla and some other old CMS) Now I am testing WordPress and I have some doubts about how create a navigation menu in my WP Site. This is my ...
1
vote
2answers
367 views

wp_nav_menu including Skype URL

If I try to add a skype username as the URL for a wp_nav_menu item, the item is saved but the URL is not. The username URL is in the following format: skype:example?call Any thoughts on add skype: ...
0
votes
1answer
593 views

How to construct a custom html for submenus

How to write a walker class for constructing a new submenus. for my wordpress theme the submenu is looking like this: <li class="drop"> <a data-scroll-nav='2'>Home</a&...
5
votes
2answers
6k views

WordPress Settings API, Implementing Tabs On Custom Menu Page

I've been following the WordPress Settings API tutorial series of this guy: http://wp.tutsplus.com/tutorials/theme-development/the-complete-guide-to-the-wordpress-settings-api-part-1/ So far, I've ...
0
votes
2answers
1k views

How to remove UL class in wp_nav_menu?

How to remove ul-class in wp_nav_menu? 'items_wrap' => '%3$s', 'container' => false Adding above does not work.
5
votes
2answers
273 views

Add custom html to last sub-menu item

I'm adding a custom menu to my wordpress theme. I need to add custom html to the final submenu item - before the primary sub-menu closes </ul> I have registered my new menu //functions.php ...
0
votes
0answers
127 views

wp-nav menu with custom walker , how to remove a tag if it has any submenu

i want to do wp_nav_menu custom walker ? can i convert wordpress menu this html if it has any submenu remove a tag from list item for example below galleries item I tried to leave empty link . but ...
1
vote
0answers
10 views

Navigation label for page in custom theme

In Appearance -> Menus, one can change a page´s navigation label. The label is what shows in the menus. However, i´m using a theme with a custom menu, always showing the full page´s title in the menu. ...
0
votes
0answers
16 views

How to know which menu trigger a link?

I have two menus locations in my WordPress self hosted Blog. Both menu locations (Header, Footer) have the same menu items Contact Us. Now, when an user click this link. It will take him to the ...
0
votes
0answers
14 views

How to add a page/post to the 'primary' nav menu? [duplicate]

In the wordpress, how can i add a page/post in the 'primary' nav menu ? By code ? All i know from admin you can add it via appearance > menu.
1
vote
4answers
4k views

Adding Additional Menus In Genesis Child Themes

I have a Genesis child theme that I bought, and it only supports two menus, a primary and a secondary. However, for what I would like to do with my site I need to have 6 menus all together. This is ...
0
votes
1answer
34 views

wp_nav_menu_items filter :: custom menus fall outside ul class

I'm adding extra menu items by using WP's filter wp_nav_menu_items but the menus fall outside the ul class. My code is as follows: function your_custom_menu_item ( $items, $args ) { global ...
13
votes
3answers
319 views

Is there an easy way to replace a custom menu link with a page or post?

I've looked for plugins and couldn't find anything and I believe this should be a core feature. The Problem: The current methodology for replacing a custom link, or any menu link is by doing the ...
-2
votes
1answer
14 views

How to center top Menu bar [closed]

On the top is a grey bar containing different pages. However, it is not centered and appears left justified. Anyone know how to fix this? I am using the Vortex theme.
1
vote
0answers
149 views

Custom Navigation build using wp_nav_menu and walker

What I have Right now I have an old template in plain HTML. In there I use a custom Navigation menu built like this: <div class="collapse navbar-collapse main-menu main-menu-1" id="main-menu"> ...
0
votes
0answers
43 views

Active menu item post detail

I'm trying to make the menu item active in WordPress when clicking on a a post item. The way im matching it is based on the browser url and the url of the menu item. However it is making all my menu ...
1
vote
3answers
80 views

How to quickly create a dummy menu?

I want to create a dummy menu with 1 or 2 level of depth. I know I can create the menu via the administration module, but I want to know if there is something I can use to generate fast a dummy menu. ...
1
vote
1answer
432 views

Displaying different page links on different pages

I have a wordpress site with 100+ pages. Now suppose 5 pages are related to page 1, and I want to show them in side bar as similar pages/related pages and other group of pages in other menu in sidebar....
2
votes
2answers
2k views

How do I check if a menu exists?

I'm currently retrieving a nav menu based on the parent page's title, and if the page doesn't have a parent then it's own title. global $post; $page_title; if ($post->post_parent) { $...
1
vote
1answer
69 views

How can I put two menus in the same div?

I'm converting an html5 site into a wordpress theme, but have got stuck with my menus! this is the html version: And this is my result so far in wordpress: as you can see I can't get the social ...
0
votes
0answers
21 views

How to add fontawesome icons wp_nav Menu?

I have read one question and tried that code as well. But it gets the menu like this. <ul id="main-menu" class="nav"> <li id="menu-item-334" class="menu-item menu-item-type-post_type menu-...
0
votes
1answer
24 views

Show more menu items to registered members

I need help with my membership site. I would like to some menu from visitors from my Main Navigation and make it visible to logged in members. How can I achieve this, something like : Home-Login-...
0
votes
0answers
30 views

How to remove Pages links from nav menu?

I've been looking at and trying themes for a long time, and found several that I liked except they make a menu bar listing all Pages. I built an "About" menu with three specific pages on it. I don't ...
7
votes
2answers
592 views

Does Extending Multiple Nav_Menu_Walkers Allow Nested Menus?

Essentially I'm trying to add multiple sub nav menus and I'm pretty close but I just can't seem to find the right tack to solve my problem ... I'm using a variation of a Stu Nichols CSS Menu ... ...
0
votes
0answers
79 views

How to divide wordpress menu with sub-items on two ul's (using Walker Class)?

There is a great answer http://wordpress.stackexchange.com/a/36407 for splitting menu on two, and there are other great examples on web explaining how to do this, but no answer explains how to do this ...
2
votes
3answers
10k 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 ...
1
vote
1answer
46 views

How to remove menu installed in wp-admin by a theme? [closed]

I installed Placester theme.And then disabled it, and deleted it. But there is still a menu there. How can I remove it? The only installed plugins are: Akismet Contact Form 7 Google Analytics by ...
0
votes
1answer
31 views

How can I list the current pages siblings and any ancestor page siblings?

For example, if this were my page structure: Food Vegetables Dairy Fruits Apples Bananas Kiwis Oranges Sports Hockey Baseball Football ...
0
votes
1answer
84 views

Dynamically add sub menu items

I have been able to add menu items with this statement, this however creates a flat menu. The menu has been created already. I just need to add items. wp_update_nav_menu_item(4, 0, array('menu-...
4
votes
5answers
1k views

Any walker causes blank menu?

Using the following, or any other custom Walker_Nav_Menu seems to cause a blank navigation menu, I tried specifying the default to make sure I wasn't going crazy yet it still blanks the output... Any ...
0
votes
2answers
115 views

How to place login logout link on menu that redirects users back to current page?

I am working on an area of my site for members. However, I need a link on my menu that when clicked it will take people to my login form then back to the page they were previously on. I need the same ...
0
votes
0answers
28 views

Accordion Menu not being called

I'm trying to add a vertical accordion menu to my custom theme, and I have no idea what is not working. The original tutorial is here : http://cssmenumaker.com/blog/wordpress-accordion-menu-tutorial ...
0
votes
1answer
614 views

How do I add the data-toggle=“modal” data-target=“#myModal” attribures to a WP Nav bar?

I'm new to Wordpress so please be patient! I've created a template in html5/ccs3 and am in the process of trying to make a wordpress template out of it. In my navigation menu (in html) I have a ...
0
votes
0answers
23 views

Hide admin menu items for role

I would like to hide the admin menu items 'Posts', 'Pages', 'Tools' etc. for specific custom added roles. But I don't only want to exclude the items from the menu, I also want to make it impossible ...
0
votes
0answers
31 views

On pages, dropdown menu not displaying

On the main menu for my site, three items have sub items. On the index page, those sub items appear as a dropdown when I hover over the main items, but if I navigate to any other page, the dropdown ...
0
votes
0answers
45 views

Getting Menu Items Parameters in Javascript Loop

I'm using the Menu Image Plugin - https://wordpress.org/plugins/menu-image/ It adds a image to the menu I need to extract or output the menu items ie Name, Menu-Url, Menu-image into javascript loop, ...
0
votes
1answer
39 views

Menu Details Output in Javascript [closed]

I have to output page, parameters( Page Url, Page Name, and Page's featured image) in javascript loop, one by one I think we can display it through NavMenuItems or NavMenu functions Pages displayed ...