更好的导航:如何在WordPress中添加下拉菜单

Wordpress12个月前发布 SUYEONE
1.7K 0 0

WordPress comes with a built-in menu management system that allows you to easily add menus to your Website. However, as you add more pages, posts, and miscELLAneous content, it may become challenging to fit all destinations in a standard menu bar. In such cases, replacing the standard horizontal menu bar with dropdown menus can help you access every section of your site without cluttering the menu. In this quick tip, I’ll share two simple methods to convert any standard WordPress menu into a dropdown menu. Best WordPress Navigation Plugins Before we begin, I want to mention that you can find over 7,000 of the best WordPress plugins ever on CodeCanyon, avAIlable for a one-time affordable payment. These high-quality plugins can fulfill your navigation or other needs. Free WordPress Tutorials AdDiTionally, you might want to check out our in-depth WordPress tutorials, which include over two hours of video instructions for beginners. There’s even a special course dedicated to working with WordPress menus. Create a Standard WordPress Menu You can add dropdown functionality to any WordPress menu. If you don’t have a standard menu to convert into a dropdown, you’ll need to create one. Log into your WordPress account (if you’re not already logged in). In the left menu of WordPress, choose Appearance > Menus, and then click the Create a New Menu button. Name your menu, and then select Create Menu. Note that the menu name won’t appear anywhere on your site, so it’s just for your reference. The Menu Structure section lists all pages, posts, custom links, categories, and formats you can add to the menu. Click on any section to view all available items within that category. When you find an item you want to add to the menu, select its accompanying checkbox. When you’re satisfied with your selections, click Add to Menu. All these items will now be added to your menu. At this point, you’ve created a standard WordPress menu; your next task is to add the dropdown functionality. Convert Any WordPress Menu to a Dropdown Menu To turn a regular menu into a dropdown menu, you need to use drag-and-drop to create “parent” items (which will display as part of the main menu) and “child” items (which will show as dropdowns under their parents). For example, in the screenshot below, “Settings” is the parent, and “Password Reset” and “Logout” are its children. This gives me the following dropdown menu: You can arrange menu items into parent and child menu items in the Menu Structure area. p & gt First, grab anything you want to be a child item. Drag the child item onto the parent, but don’t release the mouse yet. Move the mouse slightly to the right, so it nests under the parent. Release the mouse, and the menu item should become a child of the parent. If you’re happy with how your dropdown menu is orGANized, click Save Menu. Manage Locations: Display Your Menu Now, we need to place this dropdown menu on our website, so click the Manage Locations tab. Depending on how your site is set up, you might have different menu location options. But if you want the menu to display as part of your site header, you typically need to select Top Menu, Main Menu, or Primary. If you’re satisfied with your choice, click Save Changes. Your dropdown menu should now be displayed at the top of your site. Build Dropdown Menus with the Theme Customizer Alternatively, you can use WordPress’s live preview and customizer feature to create dropdown menus. In the WordPress left menu, choose Appearance > Menus. Click the Manage Menus button with Live Preview. This takes you to a section of the Theme Customizer where you can build a standard WordPress menu by clicking the Create a New Menu button. Name your menu, and then click Next. Click Add Items and select each item you want to display as part of the menu. To turn a standard menu item into a sub-menu item, drag it onto the item you want to serve as its parent. Before releasing the mouse, drag the child item slightly to the right, then release. The item should now convert to a child of the parent item and display as part of its dropdown menu. As you organize your menu into parent and child menu items, your changes will be reflected in the live preview. Rinse and repeat until you’re satisfied with how your dropdown menu is configured. Specify the new dropdown menu’s display location by selecting one of the Menu Location checkboxes. Note that available options will vary depending on the WordPress theme you’re using. If you’re happy with how your dropdown menu is set up, click Publish. Your new dropdown menu should now be visible on your website. Conclusion In this quick tip, I showed you how to create a standard WordPress menu and then convert that menu into a dropdown menu. By choosing dropdown menus, you can ensure your website remains easy to navigate without cluttering the menu bar. For more tips and tricks on how to make the most of WordPress menus and other WordPress plugins, check out some of our other tutorials. UberMenu: Best-Selling WordPress Premium Menu Plugin If you’re looking for a top-notch WordPress menu plugin, consider UberMenu. With UberMenu, you can quickly develop custom large menus for your WordPress site. As one of CodeCanyon’s best-selling premium menu options, this plugin is ready to build fully responsive, touch-friendly menus that perform consistently across Platforms. This user-friendly plugin lets you quickly build advanced sub-menu layouts within a system you’re already familiar with. The plugin is entirely customizable, allowing you to create a large menu that perfectly complements your website. That’s a wrap on how to add dropdown menus in WordPress. For more相关内容, be sure to follow Host Reference for other informative articles!

© 版权声明

相关文章

暂无评论

暂无评论...
☺一键登录开启个人书签等功能!