Skip to Content

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:

  1. Open WordPress admin.
  2. Go to Appearance > Menus.
  3. Edit the menu assigned to the location you need.
  4. Save menu assignments if you moved a menu to another location.

How to add a new menu location:

  1. Add the new slug and label to balinot_theme_menu_definitions().
  2. Use theme_menu(‘new-location’) in the target template or partial.
  3. Optionally create assets/css/menu-new-location.css.
  4. 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