开发者 | RedEarRyan |
---|---|
更新时间 | 2021年9月7日 02:35 |
捐献地址: | 去捐款 |
PHP版本: | 7.2 及以上 |
WordPress版本: | 5.3 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
kneejerk_menu_swapper
directory to your site's /wp-content/plugins/
directoryThe best examples of how to use this plugin are where you have a navigation menu with login/logout functionality, or perhaps you'd like to add items to your navigation menus for when someone is logged in. In these scenarios, figure out which location the menu title is describing, create another menu in the wp-admin's Appearance -> Menus similar to it (with the additions and/or changes), and use that menu for the swap.
Not yet. I've thought of this feature, but haven't yet had the demand to implement it! If you feel this would be a great addition - send me a note on https://kneejerk.dev via the contact form at the bottom!
All of the menus the KJD Menu Swapper knows about are created in the wp-admin area's Appearance -> Menus. Once you've created a menu there, set it as the menu for different registered menu locations in your theme as usual. Once that's done, the KJD Menu Swapper can allow you to swap that menu to a separate one designed for users that are logged in.
This is because your active theme doesn't have any registered nav menus. In this scenario, the KJD Menu Swapper plugin isn't going to be able to swap any of your menus when someone is logged in.
KJD Menu Swapper isn't built to disable menus by design. If this is a feature that KJD Menu Swapper should work for, I'd love to hear that feedback. As it sits, I've made the conscience decision (perhaps in error) to not honor those swaps.