Menus
Menu locations are defined in wp-content/themes/balinot/setup/includes/theme-options.php inside balinot_theme_menu_definitions().
Current locations:
- primary
- footer
- categorias
- mobile
- social
- legal
- interes
Registration flow:
- wp-content/themes/balinot/modules/10-menu.php registers all locations on after_setup_theme.
- The same file provides theme_menu() and theme_get_menu_items_by_location().
Rendering flow:
- Most templates call theme_menu(‘location’).
- Header and footer use custom partials in templates/partials/menu-*.php.
- Some menu partials build extra logic on top of raw menu items, especially templates/partials/menu-primary.php and templates/partials/menu-mobile.php.
Per-location CSS:
- modules/10-menu.php automatically loads assets/css/menu-
{location}.css if the file exists. - Example: assets/css/menu-footer.css applies only to the footer location.
How to edit menu content:
- Open WordPress admin.
- Go to Appearance > Menus.
- Edit the menu assigned to the location you need.
- Save menu assignments if you moved a menu to another location.
How to add a new menu location:
- Add the new slug and label to balinot_theme_menu_definitions().
- Use theme_menu(‘new-location’) in the target template or partial.
- Optionally create assets/css/menu-new-location.css.
- Optionally create a dedicated partial if the menu needs custom markup.
Important note:
- If the menu needs custom behavior, do not rely only on theme_menu().
- The primary and mobile menus already have custom logic, so extend those partials instead of replacing them with a plain wp_nav_menu output.
Last updated on