timber/starter-theme

bug report: menu.twig is not sound

flip111 opened this issue · 3 comments

menu.twig is including here https://github.com/timber/starter-theme/blob/master/templates/base.twig#L18 with passed parameter items

This condition https://github.com/timber/starter-theme/blob/master/templates/menu.twig#L1 never triggers because variable menu is not available.

@flip111 can you confirm that you have $context['menu'] = new Timber\Menu(); in functions.php ?

https://github.com/timber/starter-theme/blob/1.x/functions.php#L87

The issue could also be if you don't have a menu initialized in your WP dashboard. Or, you didn't pass your desired menu slug through to the variable @marciojcoelho mentioned.

https://timber.github.io/docs/guides/menus/#initializing-a-menu

Closing as outdated