diff --git a/www/wp-content/themes/ation2016/functions.php b/www/wp-content/themes/ation2016/functions.php index 0377eab..df02ef3 100755 --- a/www/wp-content/themes/ation2016/functions.php +++ b/www/wp-content/themes/ation2016/functions.php @@ -14,7 +14,13 @@ class StarterSite extends TimberSite { function __construct() { add_theme_support( 'post-formats' ); add_theme_support( 'post-thumbnails' ); + + // Menus add_theme_support( 'menus' ); + register_nav_menus( array( + 'primary' => 'Primary Menu', + ) ); + add_filter( 'timber_context', array( $this, 'add_to_context' ) ); add_filter( 'get_twig', array( $this, 'add_to_twig' ) ); add_action( 'init', array( $this, 'register_post_types' ) ); @@ -35,7 +41,7 @@ function add_to_context( $context ) { $context['foo'] = 'bar'; $context['stuff'] = 'I am a value set in your functions.php file'; $context['notes'] = 'These values are available everytime you call Timber::get_context();'; - $context['menu'] = new TimberMenu(); + $context['menu'] = new TimberMenu('primary'); $context['site'] = $this; return $context; }