Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /***** to dynamic menu take the following step *****/
- step one:--- to register menu in wp write the following code on functions.php
- // This code is for register menu
- function technotiers_theme_menu() {
- register_nav_menus(array(
- 'main_menu' => 'Main Menu'
- ));
- // this is for top menu
- register_nav_menus(array(
- 'top_menu' => 'Top Menu'
- ));
- // this is for footer menu
- register_nav_menus(array(
- 'footer_menu' => 'Footer Menu'
- ));
- }
- add_action('init', 'technotiers_theme_menu');
- step two:--- then in menu location write the code between <ul></ul> class
- <?php
- if (function_exists("wp_nav_menu")){
- 'theme_location' => 'main_menu',
- 'menu_class' => 'write your menu class to get css',
- 'menu_id' => 'write your menu id to get css',
- ))
- ?>
- /* CSS for show active menu in WordPress*/
- li.current-menu-item a{
- }
Add Comment
Please, Sign In to add comment