开发者 | drywallbmb |
---|---|
更新时间 | 2022年6月7日 10:37 |
PHP版本: | 3.9.2 及以上 |
WordPress版本: | 6.0 |
版权: | GPLv3 or later |
版权网址: | 版权信息 |
widget-menuizer
directory to your plugins directory (typically wp-content/plugins)The menu system in WordPress is a powerful but underutilized feature. "Menus" aren't limited to just regular navigation menus, for example -- they can also be great for things like social media icon links. But the WordPress menu system is also somewhat limited, in that it generally only offers options for links to individual posts (of all types), categories and tags, in addition to a fairly generic "Link" option. If you wanted to have a nice rich dropdown menu that showed some images, descriptions, or anything beyond just a link, you had to resort to something drastic. With Widget Menuizer, it's easy to build "megu menus" that have whatever you want in them, because the Widget system itself is so incredibly flexible. With this plugin, you can put anything you can put into a widget into a menu -- which is just about anything at all.
Because sidebars can contain menus and menus can now contain sidebars, it's possible to accidentally create a problem where WordPress gets stuck in a loop outputting a menu inside a sidebar inside a menu inside a sidebar... etc. The warning message simply indicates that your sidebar contains a menu widget and thus might cause such a recursion. At this time, Widget Menuizer can't actually tell if your sidebar contains the exact same menu the sidebar has been placed into -- just that there's some menu in it somewhere. If the menu widget your sidebar contains is for a different menu than the one your sidebar is living in, you can safely ignoring the warning. If it's the same menu, however, you'll need to make an adjustment or you'll break your site!
Because the contents of sidebar regions are tied to particular themes (different themes have different regions, after all), if you place a sidebar that belongs to one theme into your menu, and then change themes, the sidebar will not be shown in your menu. Only sidebars from the active theme can be displayed. If you're using a child theme and its regions are defined in the parent, everything should work fine -- so long as you configured the contents of those regions in the currently-active (child) theme.
In the upper right corner of your window, click on 'Screen Options' and make sure the Sidebars box is checked.
Now with version 0.6 of Widget Menuizer, when you go to Appearance > Widgets, you have the option to "Add a New Sidebar." Use the form to create as many new sidebar regions as you want, which you can then insert into your menus like any other sidebars. These sidebars you create won't appear elsewhere on your site, so they're ideal for populating custom menus.
If your theme doesn't natively support showing child menu items on hover, we've got you covered! Starting with version 1.0, in the WordPress admin you can go to Settings > Widget Menuizer and check the “Show on Hover?” option.