I’m new in WordPress. I run the wordpress using xampp. Themes have a limited navigatiob menu, and I want to add two to four navigation menus with sub-menus in my theme. How can I do that? What file should I edit to add some navigation menus?
Please help me.
Thank you!
In your theme
functions.php
you should register the menu location by adding the following code:For more instruction about the
register_nav_menus()
function you can visit the related codex.Then in your theme files, you should use the following code:
For more instructions about the
wp_nav_menu()
function you can visit the related codex.Finally, the sub menu items can be manipulated from within the WordPress dashboard. You can see this video for more information.
put this in your ‘functions.php’ file