Tagged Questions
1
vote
0answers
79 views
Walker_Nav_Menu doesn't work in wp_page_menu_args filter
I need to hide certain nav items from the menu (based on the password protection functionality) and I'm having trouble getting my custom Walker to work. In fact, I can't even get the standard ...
0
votes
1answer
67 views
Does the 'nav_menu_css_class' filter accept 2 or 3 arguments?
I've been using the nav_menu_css_class filter in one of my plugins, implemented as:
add_filter( 'nav_menu_css_class', 'wbwcrf_nav_menu_css_class', 10, 3 );
function wbwcrf_nav_menu_css_class( ...
1
vote
2answers
229 views
wp_list_pages() but only show children on the branch you are on
Lets say I have this menu:
Top
|___ Sub 1
|___ Sub Sub 1
|___ Sub Sub 2
|___ Sub Sub 3
|___ Sub Sub 4
|___ Sub 2
...
0
votes
1answer
340 views
How can I apply filters in my class that extends Walker_Nav_Menu?
I have the following piece of abridged code:
<?php
class New_Walker_Nav_Menu extends Walker_Nav_Menu {
function start_el(&$output, $item, $depth, $args) {
$attributes = ! empty( ...