i trying add specific menus page html5 blank theme. created new positions via following code in functions.php
// register html5 blank navigation function register_html5_menu() { register_nav_menus(array( // using array specify more menus if needed 'header-menu' => __('header menu', 'html5blank'), // main navigation 'sidebar-menu' => __('sidebar menu', 'html5blank'), // sidebar navigation 'motor-vehicles-menu' => __('motor vehicles menu', 'html5blank'), 'salvage-menu' => __('salvage menu', 'html5blank'), 'general-goods-menu' => __('general goods menu', 'html5blank'), 'industrial-menu' => __('industrial menu', 'html5blank'), // navigation if needed (duplicate many need!) 'about-menu-menu' => __('about menu', 'html5blank') // navigation if needed (duplicate many need!) )); }
i have went admin via menu section , created menu salvage position
i go theme , try present menu using following:
<?php html5blank_nav( array( 'theme_location' => 'salvage-menu') ); ?>
i not sure how how make work. great.
thanks
that's not how show menu in files.
you've registered them, , works (you can see them in admin), need wp_nav_menu() function display menu. instance:
<?php wp_nav_menu( array( 'theme_location' => 'salvage-menu', 'container' => false, 'menu_id' => 'salvage-menu', 'menu_class' => '', 'fallback_cb' => false ) );?>
hope helps :)
Comments
Post a Comment