From f887eedb1bd3170d14c29ebb34d24b67a1425c52 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Sun, 5 Apr 2020 12:17:31 +0200 Subject: [PATCH] working on custom main menu --- kit/functions.php | 95 ++++- kit/header.php | 926 +--------------------------------------------- kit/style.css | 453 +---------------------- 3 files changed, 98 insertions(+), 1376 deletions(-) diff --git a/kit/functions.php b/kit/functions.php index ae97337..cf603c7 100644 --- a/kit/functions.php +++ b/kit/functions.php @@ -1,10 +1,99 @@ esc_html__( 'Footer Menu', 'kit' ), - ) ); + + add_theme_support('menus'); add_theme_support( 'post-thumbnails' ); + + register_nav_menus( array( + 'primary' => 'Main Menu', + 'secondary' => 'Footer Menu', + ) ); + }; add_action( 'after_setup_theme', 'kit_setup' ); + +class kit_custom_main_menu extends Walker_Nav_Menu { + + public function start_lvl( &$output, $depth = 0, $args = array() ) { + $indent = str_repeat( "\t", $depth ); + $output .= "\n$indent