The Walker class was implemented in WordPress 2.1 to provide developers with a means to traverse tree-like data structures for the purpose of rendering HTML.

learn more… | top users | synonyms

0
votes
0answers
3 views

Extending Walker_Category class

I would like to show category images on each of my custom categories. So far I've managed to echo the image url within the walker class by adding this piece of code into the existing walker_category ...
0
votes
1answer
18 views

WP List Pages - Add Title Attributes to Anchors

Using the default wp_list_pages() is there an easy way / filter to add title attribute to the anchors? Right now it just spits out the anchor with no title attribute but I would like to add it on ...
0
votes
1answer
11 views

child comments not displaying as nested

I'm having some trouble getting my comments to display as nested from other comments. My current max level of depth is set to 5 through the wordpress admin panel, but all my comments appear on the ...
1
vote
0answers
14 views

cannot grab post meta from extended Walker_Category class properly

Trying to show some custom post meta inside an extended Walker_Category class. I am very inexperienced with Object Oriented Design so this issue is quite difficult for me to solve I am essentially ...
2
votes
0answers
35 views

Admin Panel Menu Classes - Add Them To Anchor

I was wondering if there was a way to apply the classes you assign in the Admin Panel Menus to the Anchor Tags instead of The List Items. I tried to use a Walker Class to maybe get the classes out ...
1
vote
0answers
72 views

Use custom walker to add taxonomy terms to main nav menu

I created a Custom Post Type: Product and a Taxonomy assigned to it: Products So under that Taxonomy I can add different types of products (terms if i'm not mistaken). When adding new products I get ...
0
votes
0answers
21 views

Nav Walker: Set ul id to current item's title

I'm trying to assign an ID to a sub-menu ul that matches the associated items li in my nav-walker. Here's the output I'm looking for: <ul> <li> <a href="menu-item-1" ...
0
votes
0answers
105 views

Walker to add Bootstrap markup for wp_list_pages

I'm using wp_list_pages() to create a nav of the pages in my site. Some pages have children so I need a dropdown menu in the nav to show the child pages and the Bootstrap markup for dropdown menus. ...
0
votes
0answers
30 views

Walker Nav Menu - down arrow for top level, but right arrow for below

I'm using Donald Harvey's solution with Custom Walker_Nav_Menu to show an arrow where submenu items belongs. It worked for me in a project where I had a left sidebar vertical menu. But when I'm ...
0
votes
0answers
19 views

Alter menu item parent relationships with walker?

An example custom menu structure I would like users to see About Interests - Movies - Toys - Fun Job Hangouts The end result outputted menu ready for dropdownage would be About - Interests - ...
0
votes
1answer
44 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
1answer
74 views

Check if wp_nav_menu items have submenus

I'm looking to output the following markup for a menu through wp_nav_menu, <ul> <li><a href="/">Home</a></li> <li> <a href="/" ...
1
vote
0answers
33 views

Get Parent List Class for Child Pages Using Walker

I'm having trouble getting child pages to use the parent li class whilst using wp_list_pages(). I'm using a walker to get the list classes to use page title, but no matter which way I try, I can't ...
0
votes
0answers
44 views

Limit to One Custom Taxonomy Selection, Including Most Used

I've got a bit of code that limits my custom taxonomy to only allow the user to select one category, by turning the checkboxes in to radio buttons. See the screenshot below for example: I need the ...
0
votes
0answers
23 views

Extending the walker class to add a top level list item to the nav menu in a different order

I've seen functions to append to the beginning or the end of the menu, but how do I add this list item right after the first? So it would come second in the menu order. Is this possible? If so, how ...
0
votes
0answers
30 views

Why is the Walker_Nav_Menu self closing tags added in start_lvl

I'm creating a custom Walker based on Walker_Nav_Menu for a megamenu I'm working on and the issue I'm having is that it seems the tags I open on start_lvl are being automatically closed. Here's my ...
1
vote
1answer
182 views

Run a filter when a walker runs

Is there any way to run a particular add_filter function whenever a specific Walker_Nav_Menu class runs? The function always needs to run when the walker goes, and I'd like them to share variables, in ...
0
votes
1answer
57 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 ...
8
votes
1answer
692 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 ...
0
votes
0answers
13 views

Walker only returns one child page

I'm trying to create a menu on a page showing all of its sub-pages. I want to add an image to the link so I'm using a walker to edit the output of wp_list_pages. But when I call the walker only the ...
1
vote
1answer
42 views

Insert HTML inside link in a walker

I've got a custom nav walker that (theoretically) pulls the featured image from the most recent post in a custom taxonomy, and displays the the image after the link in a wp_list_categories. The ...
0
votes
0answers
19 views

Regarding Wordpress Post, reply tree view

I want to make post/reply tree view in my admin panel so anybody can guide me which is best way to do that. I am using custom post type, custom post category and also added meta values to added post ...
0
votes
1answer
66 views

Term Checklist Walker - Disable Parent Categories

Currently I have a structure where the top level categories are acting like landing pages, so they should have no posts directly assigned to them. What I would like to do is disable the top level ...
0
votes
0answers
47 views

walker_category doesn't walk?

I'm trying to use the walker_category class in order to modify the HTML output of the wp_list_categories for several custom taxonomies, but the walker doesn't seem to 'work the tree'. Here is my ...
0
votes
1answer
41 views

Horizontal Navigation

Hi. I been fighting with this problem for couple of weeks now. Trying various approaches. From CSS styling to a custom walker. I want to render each level as its own element. The navigation ...
3
votes
2answers
89 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
249 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
46 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
46 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
557 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. ...
0
votes
0answers
134 views

Custom wp_bootstrap_navwalker file

I got a little problem right here. So I installed the wp_bootstrap_navwalker and it works so far. I got a 3 stage Navigation. The problem is that the navwalker adds the dropdown-menu class to every ...
0
votes
1answer
24 views

Why is only the first operation run in my loop - except for on the last repeat? [closed]

We have a custom walker displaying only the sub menu of the current top menu and while making some changes to it I ran into something I don't get - for some reason only the first echo of each loop in ...
0
votes
2answers
61 views

Page thumbnail doesn't display on navigation

I want to display thumbnail on navigation (using walker) but it doesn't display in the right place. Thumbnails displays only in index.php, before the navigation links and all these thumbnails are ...
1
vote
2answers
57 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 ...
1
vote
1answer
37 views

Make parent page only link to first subpage

I'd like to automatically make any parent page link to it's first subpage if it has one. Like so: Parent 1 (/#subpage-1) Subpage 1 (/#subpage-1) Subpage 2 (/#subpage-2) Subpage 3 (/#subpage-3) ...
0
votes
0answers
162 views

Nav menu custom walker not working in child theme

I have created a parent theme with a nav menu walker that works fine. I want to create a child theme to show small variations to the client. When I put the same code in the child theme it doesn't ...
0
votes
2answers
172 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' => ...
0
votes
1answer
77 views

Help with output of post classes using apply_filters

I’m new to scripting, this is a plugin I'd like to modify to output post classes. When I try using: apply_filters( 'post_class', $page->post_class ) it only outputs array=" ". Do I need an ...
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 ...
0
votes
0answers
47 views

Getting post content within wp_nav_walker

I have a custom walker set up designed to add content into the nav menu. The problem being that it is not pulling the content. The post object returned by the get_post/get_page has an empty ...
1
vote
0answers
24 views

Get top items number from wordpress menu

I've made a menu in Wordpress backend with 3 levels depth. (4 main tabs with 2 sub level items) I would like to know how I can get the number of tabs created automaticly and add this number to a ...
0
votes
0answers
38 views

Override edit_custom_walker.php to conditionally show input depending on menu position

I've created custom inputs for WordPress nav-menus admin page. I've used a similar technique as is shown in this answer - by duplicating edit_custom_walker.php and adding my own fields. My custom ...
1
vote
0answers
35 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
75 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
85 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
37 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
86 views

How to add a element with walker menu right after begin of the navigation tags?

I was trying to add a element right after begin of the navigation tags and before the ul will start. So add a element directly after opening nav tag. I tried this, but this will add a list item after ...
-1
votes
1answer
30 views

Custom walker pulldown display current page

I have this pulldown menu and when I go to a page with this pulldown menu, I want that the current page is showed in the pulldown menu. I've searched in the documentation but can't find any. class ...
0
votes
1answer
81 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
15 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 ...