0
votes
1answer
26 views

How to remove dropdown from wp_nav_menu

I dont want to have dropdown (select - options) in my wordpress menu, even in mobile or lower width devices. I know I can use css to hide it, but I want to remove it at all. I googled for an hour and ...
0
votes
0answers
29 views

Extend walker - navigation, adding data attribute to a tag

I would a data attribute to the a tag in the menu, like have <a href="#example" data-attribute="attribute">CLICK</a> I know that I have to extend the Walker BUT I tried in several times ...
7
votes
1answer
395 views

Mega Menu Walker

I'm trying to create a mega menu walker. Unfortunately, walkers completely escape my coding knowledge. I could really use some help getting it working. Here's the features I need: Wrap the ...
2
votes
1answer
55 views

Adding Post Counts to Menu (Nav) Programmatically?

I'm fairly stumped on this. Without getting too query-heavy, I was wondering what path one might take to produce a menu that links to a category of posts, and displays in parenthesis how many new ...
1
vote
1answer
87 views

Change an li class name in a wordpress custom menu walker

I'm building a nav that has a class applied to the main LI's and the nested LI's. Example: <ul> <li class="className">Test</li> <li class="className">Test <ul> ...
0
votes
0answers
30 views

Walker_Nav_Menu - creating separate menu for current top level item children

I have had hard time making wordpress custom walker work as I want and I think the problem might be somewhere else. I have a nav tree which looks like this: What I want to do is to have two ...
0
votes
1answer
34 views

Use wp_nav_menu to display ALL pages

I am currently building a wordpress theme. For the menu, I just want to display all the pages that are created in the order that they are created in (i.e. I don't want users to have to go into the ...
0
votes
1answer
200 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. ...
1
vote
2answers
51 views

Detecting classes, adding widgets, and adding divs in with a Nav Walker

I've been trying to figure this out for days, to no avail. A template I'm building requires a mega menu. The markup for the menu looks like this: <nav> <ul> <li><a ...
0
votes
0answers
12 views

Custom nav walker error [duplicate]

I'm using wordpress 3.9 locally to develop a new theme for my website, however I am getting these errors when trying to use a custom nav walker function: Strict Standards: Declaration of ...
1
vote
0answers
32 views

Walker_Nav_menu access parent menu name

I extended Walker_Nav_Menu with the code below and I would like to replace [TITLE HERE] with the name of the parent menu... In my menu I only display one depth of the navigation at a time. So I would ...
1
vote
0answers
56 views

Rendering of custom walker menu function not working properly

I have a custom function for my nav walker menu that adds custom php/html to it, which can be seen below. It renders a twitter bootstrap dropdown menu that I would like to put my login form in. ...
0
votes
1answer
69 views

Customize Walker_nav_menu to show posts if item is category

I would like to customize the nav menu walker so that when it encounters a category it automatically makes the 5 most resent posts children of the menu item. Is there a way to dynamically add items ...
1
vote
0answers
33 views

Can I use multiple nav_walkers?

I am working on a project and I came to the conclusion that I need to use 3 nav walkers: one for edit and 2 for HTML formatting class MY_Walker_Nav_Menu_Edit extends Walker_Nav_Menu {} // this ...
0
votes
1answer
69 views

Add login hyperlink to secondary navigation menu

I have the following lines of code in my functions.php file: #-----------------------------------------------------------------# # Custom menu ...
0
votes
0answers
14 views

Get parent menu item id on submenu ul using start_lvl [duplicate]

I'm struggling with the Walker_Nav_Menu. In the start_lvl function, where I create the <ul> tag holding my submenu, I want to insert the item ID from the parent menu item. I know that I can ...
0
votes
0answers
117 views

Adding 3rd level in custom walker

at present my custom walker works great :) but I can for the life of me get a 3rd level to appear... I can get the top level and the 2nd level dropdown to show perfect, but how do I achieve a 3rd ...
0
votes
0answers
93 views

Image URL only for custom navigation walker (walker_nav_menu)

I'm attempting to build a custom navigation walker that pulls a page's Featured Image into the page's menu item. I intend to use the Featured Image as a background for the menu item (which is prettier ...
0
votes
1answer
63 views

Using Different nav_menu_css_class for different nav_walkers

On my theme I have to different nav_walkers, I'd like to be able to call two different nav_menu_css_class-es for each menu alas, they appear to apply globally. Here's what I have function ...
1
vote
1answer
2k views

Customizing Walker_Nav_Menu

I'm looking for a solution to adjust the output of wp_nav_menu only on a specific navigation menu. I have my menu: wp_nav_menu( array( "container" => "nav", ...
0
votes
0answers
40 views

Creating a custom menu with icon fonts

I want to create a custom menu with icon font markup. So I may need to have my list item have e.g. this: <i class="gen-enclosed foundicon-left-arrow"></i> contained inside anchor - or ...
0
votes
2answers
1k views

Show children (sub-navigation) of active menu item only

So I've searched the net and attempted to code a custom walker class that will do this, but I'm new to WordPress and although similar questions exist none fit exactly what I'm looking for, or suggest ...
2
votes
3answers
1k views

Strict Standards Error bootstrap navwalker

I am having trouble understanding this error and I've not come across it before, please could someone help? Strict Standards: Declaration of wp_bootstrap_navwalker::start_lvl() should be compatible ...
-1
votes
1answer
128 views

Custom navigation / menu output (walker?)

I'm trying to implement a responsive jQuery navigation but I need to extend the default output of the WP menu. I believe I need to use a custom walker but honestly, I don't know how to get it to work ...
0
votes
0answers
47 views

How to add a heading under sub-menu by using Nav_Menu_Walkers

I have customised WordPress wp_nav_menu by using Nav_Menu_Walkers and currently achieve the following format: <a href="#">Menu Parent</a> <div class="sub-menu"> <ul ...
0
votes
0answers
23 views

Help with Wordpress Walker Function [duplicate]

I need some help customizing a walker function. I don't fully undrestand it, but it's helped me get half of what I need. class themeslug_walker_nav_menu extends Walker_Nav_Menu { // add ...
0
votes
1answer
52 views

Modifying navigation menu classes with a Walker

I did a class that extends Walker_Nav_Menu to modify the default classes of my < li >s but also to modify the default classes of my < ul >s. It seems that only the sub-menus are affected by the ...
0
votes
1answer
81 views

Walker for menus

I want to modify all of my <li>'s classes and ids, but the function wp_nav_menu() does not let me do so, so I think I need to use a walker. I am pretty new in OO, so using an object is not ...
0
votes
1answer
61 views

changing the labels inside appearance -> menus for some for the fields

So I've create a custom walker for nav menu (i am talking about the menus located at: appearance -> menu -> add a new menu. I now use the following for several things i need: URL Title Attribute CSS ...
0
votes
1answer
1k views

Add <span> within the <li> output of <? wp_nav_menu() ?>

Im currently printing out: <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?> Which outputs: <div class="menu"> <ul> <li ...
0
votes
1answer
484 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 ...
3
votes
1answer
1k views

Determine if a navigation item has children

I am trying to determine if an item has a sub-item with depth 1 or higher. I cannot find anywhere if there is some function/query I can write that grabs the current item looks in the database if it ...
5
votes
2answers
359 views

Call custom field into menu item

I have a navigation menu in Wordpress. I would like it to check if the page has a custom field of "menu_icon" and if it does, add that custom field into the menu item it corresponds to. I'm sure this ...
0
votes
2answers
4k views

add span class inside wp_nav_menu link anchor tag

I found examples adding a class to top level items, so we can display an arrow in menu items with sub-items, but is seems terrible to cope with the already built in WordPress classes, can't display ...
-1
votes
1answer
87 views

Navigation won’t update to show full path to single post

I have a site with a custom post type “projects” and two taxonomies “clients” and “mediums”. For the navigation I’m using a custom nav walker (that extends Walker_Nav_Menu). This all works very well ...
1
vote
0answers
346 views

Help with walker for nav

For some reason, this walker won't work when I pass in 'echo ' => 0, it always prints the nav, and never returns the nav as a var. I can't seem to figure out where it's by passing that in ...
0
votes
2answers
414 views

Nav Menu – Add class based on meta keys

I'm trying to find a way that changes the classes of the different nav menu items, based on the value of a meta key in the page. The menu currently looks like this: <li ...
1
vote
1answer
533 views

Bar separated navigation by extending Walker_Page

This question follows on from this one: Bar separated navigation by extending Walker_Nav_Menu I'm trying to do the same thing but this time I'm extending Walker_Page instead. The issue I'm having ...
2
votes
2answers
1k views

Bar separated navigation by extending Walker_Nav_Menu

I have the following menu in my header: <?php $args = array( 'menu' => 'Main Menu', 'container' => false, 'depth' => 1, 'items_wrap' => ...