This tutorial provides the code which enables you to modify the default output for the Navigation Menu widget included in all WordPress themes.
This method enables you to modify the widget via the safety of your child theme so your modifications won’t be lost when WordPress updates the code for this widget.
There’s 2 steps relating to usage of the files in the download folder :
Step 1 : Upload the file named custom-nav-menu-widget.php to your child themes root directory.
Step 2 : Copy & paste the code from the functions.php file to the end of your child themes functions file.
Register or login to access the download folder :