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
2answers
782 views

Remove current class from sub menu items

I am building a wordpress website with drop down menu (sub menu). To achieve this here I am using wordpress walker class. This is the code which I am using in my functions.php class ...
0
votes
2answers
795 views

Bootstrap dropdownl nav pills not working as wordpress drop down menu

I am using Bootstrap nav pills with drop-down items as WordPress menu, the menu without drop-down is looking good but when I add nested ul as drop-down the menu not working as expected.. HTML <...
-1
votes
1answer
49 views

Update wordpress menu with woocommerce products

For aesthetics purposes, i chose to keep the menu from my theme (twentyfifteen). I have a large catalog of products and i use Woocommerce to keep them into categories and products. Everytime I add a ...
0
votes
1answer
49 views

Fragment URL in navigation item without a custom link

Some of the pages in my navigation are fragmented urls that shouldn't actually go anywhere. In other words, I have a couple parent nav items like <a href="#">Services</a> that serve only ...
-1
votes
0answers
16 views

Add menu item in middle of menu

I have used following code to add menu item in a menu. add_filter('wp_nav_menu_items', 'add_custom', 10, 2); function add_custom($items, $args) { if ($args->theme_location == 'primary') { $...
1
vote
2answers
29 views

Number of items in a menu

I can't find if WordPress stores the number of items in a menu. Basically I need to find out how many items are in a menu to work out the percentage each item should take up in the header bar. Is ...
-3
votes
1answer
27 views

Site Broken, how to debug

I have a WP Site : http://kendo.mx It's been a while since I didn't check it, last time it was working. Then, today, it gave me a fatal error, so I had update RevSlider to last version. I also ...
0
votes
1answer
2k views

Use menus with anchors

I have a CPT archive page and I want to create a navigation menu which will jump to anchors in the form <a name="post-slug" http="{the permalink goes here}>The CPT Title</a> I have been ...
0
votes
1answer
550 views

How to translate menu items?

is there i way for menu to be translated when i choose website language? Can it be done without using a plugin? Does anyone have a solution to do it withot using the plugin? Thanks in advance
1
vote
1answer
3k views

Adding menu items dynamically using wp_nav_menu_objects

On my primary navigation, I want each top level page to have a list of the subpages. So I created code that dynamically adds menu items to the primary navigation. This works only on the first level of ...
0
votes
0answers
20 views

How do I remove copy of primary menu from footer on mobile?

Using wordpress 4.5.3 with the Twenty Sixteen theme. When viewing my site on mobile the "Primary Menu" appears twice. There is special mobile "Menu" button that displays at the top of my site, ...
1
vote
1answer
468 views

Remove nav menu item by script

I want to create my custom nav menu using a script in a wp plugin. I'm almost there using this tutorial. All I need is the option to delete menu entries. something like wp_delete_nav_menu_item($...
0
votes
1answer
14 views

Tag Menu items based on their categories

Suppose I have a site with this menu-structure: food banana carrot apple lettuce where the fruit-items belong to fruit and the vegetables belongs to vegetable. Now ultimately ...
0
votes
0answers
14 views

adding sub menu items make the parent menu item non clickable

Here is my menu structure link. And this is my website link http://www.clabiane.net/, you can see that menu is not working as it is supposed to work. The main thing here is that the parent menu item (...
0
votes
1answer
53 views

How to add search to menu?

How to add search to menu? I want to have: add_filter('wp_nav_menu_items','add_search_box_to_menu', 10, 2); function add_search_box_to_menu( $items, $args ) { if( $args->theme_location == '...
0
votes
0answers
824 views

collapse twenty twelve submenu in mobile version

In the twenty-twelve theme, the following code will collapse the sub-menu ul/li on the mobile version. The problem is that it also breaks the normal version of the menu. How can I use it only when the ...
0
votes
1answer
43 views

Eliminate menu collapse button on website

I have a website I'm working on sandyhookfoundation.com/wp. It loads on desktop browsers with a "menu" button in the top left corner of the main menu. I can't seem to find how to eliminate it. I ...
0
votes
1answer
18 views

wp_nav_menu custom walker <a> class

So I'm learning about custom walkers and I've run into a few issues. I've got a custom walker set up. One issue I'm having is figuring out how to add a class to the <a> inside of the start_el ...
0
votes
2answers
34 views

Make a permalink to the most recent blog post

I want to make a permalink to my most recent blog post. I would use this link as a navbar link. The reason I'm not putting code straight into the navbar is because I am using a widget which will not ...
3
votes
2answers
7k views

Using wp_get_nav_menu_items() to list children of children pages

I'm working with a Genesis Based Theme and I'd like build a Page/ Child Page menu structure. That part I can do with the help of some code produced by Bill Erickson. Essentially what I'm trying to do ...
0
votes
1answer
443 views

Can't create a SubMenu

I have created a new WordPress blog at http://www.shanytopper.com and I have a problem. I am using a wp_nav_menu for the main menu in my website (I added the suppert to the theme myself), and it ...
0
votes
1answer
753 views

How to retrieve depth of menu into template

In wp_nav_menu i use for the menu, with custom walker, i can get the $depth parameter in the start_el function function start_el(&$output, $item, $depth, $args) but, outside this wp_nav_menu(),...
0
votes
1answer
953 views

Child pages don't become submenus (as in the twenty-ten theme)?

I'm using the theme Starkers, which is based on twentyten. My twentyten theme places child pages below its parent page. But the new theme (based on Starkers) I'm developing doesn't (it just places it ...
0
votes
1answer
46 views

Show posts count for Categories and Tags in wp_nav_menu

I'm trying to show WooCommerce Product Categories, Post Categories, Product Tags, Post Tags and Custom Taxonomy posts count in main navigation using wp_nav_menu. My WP_NAV_MENU code &...
1
vote
1answer
459 views

Wordpress Shortcode in Menu Item Title

I've looked and have not found anything that works. I am trying to include a shortcode in a menu item's 'Navigation Label'. Basically Iwould like to have a dynamic title displaying the user's name &...
1
vote
0answers
25 views

Conditional Nav Menu Inside Nav Menu Across Multisite Sites

I am attempting to use the main site menu across a bunch of sub-sites in a WordPress multi-site configuration. The sub-sites use the main site's navigation. However, I want to omit one tree of links ...
0
votes
1answer
21 views

menu-item class missing on wordpress menu

I have this code in my header.php and its working properly except showing li's without menu-item class, its showing them with page-item instead. this is when i dont have a menu created from admin and ...
0
votes
0answers
13 views

How to move sub menu ul outside of main menu li?

I am struggling to understand how the sub menu of wordpress works. I have set up a menu in the Appearance panel, and I am using bootstrap. When I add a sub menu item, the ul that enclose the sub ...
0
votes
1answer
25 views

Getting URL value from menu item by ID

I want to display a link on the Frontend, but the URL value changes over time. It'd be very easy for me to just change it manually in the Wordpress menu once (it's also displaying there), and then ...
0
votes
0answers
10 views

Wordpress Menu Integration

I designed a html menu and tried to integration to Wordpress, but couldnt achieve. How i can integrate below html menu for wordpress? <ul class="cf"> <li class="index-collection ...
0
votes
1answer
19 views

Is it possible to seperate wordpress menu by different div?

I'm looking for a way to display a WordPress menu separating its links into different divs like this: <div class="col-2-4"> <p><a href="">link</a></p> <p>&...
0
votes
0answers
21 views

how to adding css classes when it has 2 level children true wp nav_walker

I need to create a website true bootstrap 2.3.2 ( cause of sub-menus). and it has 3 or 4 level in menus. <div class="nav-collapse collapse"> <ul class="nav go-right"> ...
0
votes
0answers
10 views

Register a menu onclick function

I am trying to add this in an abc.php file where add_footer_menu() is a onclick function. This is showing me the "Menu added." but menu is actually not generating. <script type="text/javascript"&...
0
votes
1answer
648 views

Can I output a custom taxonomy as a submenu in the site navigation menu?

I'm building a WP 3.2 site with a couple of custom post types and taxonomies. I'm calling one of these custom post types programs, and its associated taxonomy is called topics. I'd like to add an ...
0
votes
1answer
77 views

How to check custom fields from functions.php

I'm trying to hide certain menu items based on the custom fields on a page. I could use CSS or a script to hide the items, that's not the problem. What I don't know is how I can check the custom ...
1
vote
1answer
1k views

Unable to center menu and header image twenty twelve

I have a really simple site at cyriljoyce.com on the 2012 theme I created a child theme to center the header and menu bar but just cannot seem to make it work. The child theme text is below The line ...
0
votes
3answers
31 views

How to disable permalink of a particular menu item?

I'm using WordPress Twenty Sixteen theme. Now I've a menu item named Product and it has a sub menu. The product page has a permalink as usual, but I want to remove it i.e., when I click on this menu ...
1
vote
1answer
67 views

$variable (counter) inside wp nav menu

My WP menu structure looks like this (simplified) <ul> <li class="dashboard menu-item ... menu-item-56"><a href=#link">WP link</a></li> <li class="messages menu-item ....
0
votes
0answers
37 views

Custom_Walker_Nav_Menu is repeating my navigation menu in wordpress

I am converting HTML Template to wordpress theme. I almost convert everything expect my navigation menu. I want exact same navigation menu that is in my HTML Template. I searched a lot on how to ...
0
votes
0answers
11 views

What is the best option to change menus automatically using cookies in a Multisite installation?

I am developing a Portal using the Wordpress Multisite option. I would like to create a portal's homepage with options that direct the user to his country's website (Subdirectory). And i would like ...
0
votes
2answers
675 views

Automatically add child pages to menu

I've been reading through some of the questions and solutions people have already asked to no avail. I have 4 menus on my WP Site, each of which will have children. What I would like the menu to do ...
0
votes
2answers
539 views

Hide page link in main menu from anonymous users

The title pretty much explains itself, I'm looking for a way/plugin to hide the menu link to a specific page from users that aren't logged in.
0
votes
0answers
29 views

Disable Responsive Mobile Navigation Menu?

With my theme I currently have a 'hamburger menu' that slides in on a desktop screen, but with the responsive design, on a mobile or small screen, there is a dropdown menu instead at the top. (Cherry ...
0
votes
2answers
2k views

Wrapping link and .sub-menu with wp_nav_menu

I want to wrap each sub-menu ul and the tag just before it with a div. I can create the opening tag using the 'before' attribute of wP-nav_menu like this: wp_nav_menu(array( 'before' => '&...
1
vote
1answer
31 views

Custom Static Links For Specific Menu Right Before/Next The wp_nav_menu Function now working

I am trying to add custom links next/before my built in menu, specifically for main_menu. I have placed this in my functions.php and have given list-items in nav-menu-after.php and also in the before ...
4
votes
1answer
1k views

How Does The Walker Class Work?

Can someone explain to me how the Walker Class works? Do the methods inside the class always need to overload the parent method?
0
votes
1answer
32 views

Child Theme header1.php file not overwriting parent theme's header1.php file

I am trying to add a custom header navigation to a WordPress site using a child theme (I'm using the Alphabet theme). I determined that I am using the header1.php file according to the styling inside ...
0
votes
0answers
20 views

customize exisiting wordpress menu item

For a school project I am trying to manipulate the existing primary menu with a plugin. The result should be: if the plugin is activated, it edits the 'Login' button to be conditional: if something ...
1
vote
2answers
33 views

How to change the wordpress navigation bar UL to OL in Twenty_Twelve similer theme

I'am trying to make a wordpress website accessibility compliant but I have come across a problem with menu bar. It uses a modified them based on Twenty_Twelve. I need to change the "ul" tag to "ol" ...
3
votes
1answer
50 views

Add class to menu ul with active child

I'm trying to add the class is-active to the ul when the ul has an active child. This is because Foundation requires that (i'm using FoundationPress as a base theme) This is the markup i'm after: <...