wprig
wprig copied to clipboard
Changing Nav Walker
Issue Overview
I'm trying to switch from Underscores to wp-rig by converting a site we already started in Underscores; was able to create the widget areas and add menus, but the Nav has me stumped; we have a special nav walker to trigger dropdowns and mobile canvas style menu with some jquery
Describe your environment
basic wp-rig, vscode, flywheel
Steps to Reproduce
- tried to register the walker as we have in functions.php into Nav-Menu then Style, but just got errors (adjusting the location of the walker of course) /**
- Register Custom Navigation Walker */ function register_navwalker(){ require_once get_template_directory() . '/nav-walker.php'; } add_action( 'after_setup_theme', 'register_navwalker' );
- also wasn't sure where to enqueue the script for it either; copied the params and code and placed it in Nav_Menus component.php. ¯_(ツ)_/¯
Expected Behavior
want to use our navigation, toggle, mobile action but in wp-rig
Current Behavior
just get errors, can't connect the nav walker to wp-rig
Possible Solution
Screenshots / Video
Related Issues and/or PRs
I would recommend reviewing our documentation a bit more, specifically in regards to the use of Components. Then let us know if you are still having issues. Thanks.