Create Navigation Menus in Plain <a> Tags Using a Custom Nav Walker

The most common navigation menus are <a>’s wrapped in <ul> and <li>. Sometimes there is a need to create simple navigation menus without these wrapping elements.

To display a nav menu in WordPress, we use the wp_nav_menu function.

A nav walker is a class used by WordPress internally to display nav menus. You can extend this class to customize the look of your navigation menus.