I am developing a child theme for the Buddypress default theme. I am wanting to make significant changes to the html for nav menu items. It appears that the function wp_nav_menu generates the nav div html. From having read the info on creating child themes it would seem that the best approach is to create a functions.php file in my child theme directory and then add a new function there, say wp_nav_menu2, and then include this in my header.php. Having looked at the default functions.php file it is not clear to me what I need to copy over to my functions.php from the default version, and where I would add the html for my nav items. I would like the html for each nav item to be in the form:
Having said this the function in the article isn’t returning my custom menu. I added if (!isset($locations[$menu_name])){echo "not found";} and ‘not found’ was returned. Any ideas on why this might be. I have double checked that the menu name is set correctly.
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Customising html for navigation menu in child theme’ is closed to new replies.