How to add dropdown Navigation menus in WordPress Customize

August 3, 2023 |

When I was creating a WordPress theme for my client I needed to get dropdown of Navigation menus in customize so user can choose a menu. I wrote a function for that which really worked well. You can use it if you need it. Add it these below codes in your themes function.php file. It creates the dropdown. /** * Dropdown Menu List for customizer */ if ( !function_exists( 'your_theme_customizer_menulist' ) ) { // Function function your_theme_customizer_menulist() { $menus = wp_get_nav_menus(); $menu_list['none'] = esc_html__(' — Choose Menu — ', 'your-theme'); foreach ($menus as $menu) { $menu_list[$menu->slug] = $menu->name; } return $menu_list; } } Explanation of the above code: Set a variable $menu to get all available menus, then set an another variable $menu_list to store the dropdown value. Now do a foreach loop to exact the menus into drowdown options. Add the below code in function.php to create setting in…    read more 

30 Best WordPress theme for hotel and Resorts 2020

May 29, 2020 |

Touring is one of best thing human ever began to do, holidays need to spent by travel and sight seeing. When tour is become little length or long choosing a right hotel is essential to make the travel joyful. Seeing the side of business perspective a hotel owner needs a decent website themselves to attract customers to their hotel, no matter how good their hotel is and how best they serves. We decided to make a list of themes that suitable for hotel booking purpose but before going to the list you must know few things about choosing a theme for hotel business. Design: The first thing you have to pay attention is design. It is wise to choose a design based on your customers perspective like what they love to see in your site. A decent slider on front page, easy navigation, Book now button with calendar, 100% responsive…    read more