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)

1
vote
0answers
9 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
24 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
306 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
13 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
129 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
41 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
77 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
419 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 ...
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
54 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
20 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 ...
0
votes
1answer
21 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 : ...
0
votes
0answers
28 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
578 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
58 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
37 views

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

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
28 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
62 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, ...
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
92 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
26 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
374 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
29 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
36 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 ...
2
votes
4answers
785 views

Adding first and last class to Menu on top level only

I'm using a WordPress Menu to create a navigation structured like this: Home About Contact Sub Page Using this code from kuroi's response here I'm able to add first-menu-item and last-menu-item ...
0
votes
0answers
23 views

display menu depending on selection on homepage

Like I wrote in the topic On my homepage there are two links: business and consumer depending which link I choose I want to display a certain get_template_part (menu) So If you click on "business" ...
0
votes
1answer
39 views

Hide menu from homepage

I am using the WP- Spirit 01 theme and would like to know how can I hide the navigation menu ONLY from the website homepage. I don't have my website live yet. The css code bellow works to hide the ...
0
votes
1answer
67 views

How can I make wp_nav_menu() support <br> tags?

Static webpage created nav menu separating titles using <br> tags, but when I'm converting the site into WordPress I'm missing <br> tags there. How can I enable using <br> tags in ...
0
votes
1answer
231 views

Show different menu on each woocommerce category page

I have created several custom menus that appear under the main menu on the shop page. Each category (and its subcategories) should display a different custom menu like below: custom menu: ...
0
votes
0answers
17 views

Customize navigation menu in the Twenty Fifteen theme

Is it possible to change the behavior of the navigation menu in the Twenty Fifteen theme so when a user clicks a menu item to open a submenu all the other already opened submenus are closed? I'm ...
2
votes
1answer
713 views

Adding Custom Taxonomy Archive Link to Nav Menu Shows Up As (Invalid)

I have a custom post type "packages" with a taxonomy "Celebrations" that has a few terms in it. When I try to add a link to my wp nav menu through Appearance > Menus and choosing the term I want from ...
1
vote
1answer
15 views

Menu / div of year and months of blog posts?

I want a menu or a dive with this content where you can click on and see the blog posts from the selected date that is like this BLOG -2014 -january -february -march -.... -2013 ...
2
votes
2answers
848 views

Wordpress Split Menu

I'm coding my first WordPress Theme and trying to solve this problem: On the desktop version of the website I’d like to split the menu into 2 sections. One would appear on the left of the logo and ...
0
votes
0answers
36 views

Decrease vertical space between dropdown items w/o changing menu height?

Trying to decrease the vertical space between menu items in a list styled as a dropdown menu but having trouble doing it w/o decreasing height of navbar. To see current setup, click here and wait a ...
0
votes
2answers
68 views

How to add bubble count in WordPress wp_nav_menu menu?

I have to add a bubble notification in WordPress wp_nav_menu like the following code. <ul> <li> Tickets <span class="unread">2</span></li> ...
0
votes
1answer
75 views

Add data-id attribute to child page links

The should be simple but I just can't figure it out nor find an answer. I need to add a data-id attribute to the <li> parent container of the respective child page <a> links. The HTML is ...
1
vote
1answer
106 views

How to replace the page url for the page slug in a menu link?

I am developing a single page site within WordPress, that contains multiple sections. These sections are pages in WordPress. In my index.php I loop through all pages within WordPress and add them to ...
1
vote
1answer
56 views

Add a class to the body tag when a menu is enabled

Question edited How can I add a class to the body when the menu at the menu setting > theme locations is selected. Like in this screenshot: And if I have two menus, can it add two different ...
0
votes
1answer
6k views

Custom Nav Walker sub-menu HTML construct

I've got my Custom Nav Walker set up and it works fine with the main menu items, and displays them how I want. However the same HTML is being applied to the sub-menu elements which isn't what I want. ...
3
votes
3answers
12k views

Show just one level of child pages, wp_list_pages woe

I'm working on a site that has a fairly large page structure a few levels deep - in some sections there are a lot of pages. The basic setup is something like this... Parent Parent Parent -Child ...
0
votes
1answer
39 views

Make menu structure match page heirarchy on page parent change

Old WordPress themes like twentyten contained functionality which allowed nav menu structure to reflect changes in page heirarchy. For example, if I have the arbitrary page heirarchy (and matching ...
0
votes
0answers
35 views

How to create a custom walker class to replace the href with hashtag slug?

I was wondering how I can achieve the possibility to replace the default WordPress menu links with #slugname. How should a simple walker class should look like to achieve this? I came up with this: ...
0
votes
1answer
87 views

How to exclude pages in the menu without pageID?

I am creating a single page site, that contains multiple sections. These sections are pages within WordPress. I use the following loop to get all pages in index.php file. <?php $args = ...
0
votes
1answer
137 views

Adding Custom “Current Menu Item” class to navigation?

I'm using the following code to force my wordpress navigation to reflect the category of the current post. It works perfectly, but I need help to extend this function to more than just 1 category ...