Drop Down Menus not visible with the Walker Class
-
Hello,
I tried posting in the ‘Advanced Development’ area of this forum, but unfortunately, the forum was closed to new topics.
I am new to the Walker Classes in WordPress and currently trying to use said classes for creating my menu. I am following a YouTube tutorial, and have got to the stage whereby I have placed the below code in my ‘walker.php’ file:
class Walker_Nav_Primary extends Walker_Nav_Menu { function start_lvl( &$output, $depth ){ /* Handles opening of the <ul> tags.*/ $indent = str_repeat("\t",$depth); $submenu = ($depth > 0)? ' sub-menu' : ''; $output .= "\n$indent<ul class=\"dropdown-menu$submenu depth_$depth\">\n"; }
Unlike the YouTube tutorial, when I insert the above code, my drop down menus are not visible.
Has anyone come across an issue like this before and aware of how to resolve such a matter?
Any help, regarding this matter, would be greatly appreciated.
Thanks.
Craig
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Drop Down Menus not visible with the Walker Class’ is closed to new replies.