CSS(Main-menu)
<?php
$args = array(
'theme_location' => 'main_menu',
'menu_id' => 'abc',
'container' => '',
'menu_class' => 'tm-nav-ul',
'depth' => 1,
'fallback_cb' => false
);
wp_nav_menu($args);
?>
$args = array(
'theme_location' => 'main_menu',
'menu_id' => 'abc',
'container' => '',
'menu_class' => 'tm-nav-ul',
'depth' => 1,
'fallback_cb' => false
);
wp_nav_menu($args);
?>
CSS(sub-menu)
Register navigation menu
register_nav_menus(
array(
'main_menu' => esc_html__( 'Main Menu', 'cobotracks' ),
'footer_menu_1' => esc_html__( 'Footer Menu 1', 'cobotracks' ),
'footer_menu_2' => esc_html__( 'Footer Menu 2', 'cobotracks' ),
'footer_menu_3' => esc_html__( 'Footer Menu 3', 'cobotracks' ),
'footer_menu_4' => esc_html__( 'Footer Menu 4', 'cobotracks' )
)
);
if ( ! function_exists( 'awaiken_load_styles' ) ) {
function awaiken_load_styles() {
wp_enqueue_style( 'bootstrap', THEME_URL .'/css/bootstrap.min.css', false, null );
wp_enqueue_style( 'slick', THEME_URL .'/css/slicknav.css');
wp_enqueue_style( 'custom', THEME_URL . '/css/custom.css');
wp_enqueue_style( 'responsive', THEME_URL . '/css/responsive.css');
// js for comments
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
}
add_action( 'wp_enqueue_scripts', 'awaiken_load_styles' );
Function.js
/* slick nav */
$('#main-menu').slicknav({prependTo:'#responsive-menu',label:'', closeOnClick:true});