Create Different Menus with the Plugin “If Menu”

If Menu ScreenshotI discovered a new plug-in this past week while working with a client. They needed a website that had two distinct areas, but the same theme. They wanted each area to have its own main menu. At first, I thought it would make most sense to create a new menu area in the theme, then use a conditional statement of some sort to show then show Menu A on one group of pages, and then Menu B on another set of pages. With the theme I was using, I found this extremely difficult. I then discovered a plug-in called If Menu.

According to the developer of If Menu:

Simple plugin that adds extra functionality to Menu Items. The plugin will allow to show or hide menu items based on condition statements (Is single page, User is Logged In, etc).

The management is very easy, each menu item will have a “Enable Conditional Logic” check, that will allow to select a conditional statement (Example in Screenshots)

Basic conditional statements are included in the plugin, other will be included in future releases or can be added nu another plugin or theme.

The plug-in was originally intended to show specific menu items based on whether someone was logged in, logged out, or on a specific page or post. But, using the plugin’s sample code, I was able to easily create a custom menu choice that would only show specific menu items on specific menu pages.

I then went through each menu item and selected “show” on the pages that I wanted to show Menu A and “hide” on the pages that I wanted to show Menu B. It took a bit of time going through 50 pages and changing the menu options on each one, but when it was done, it worked exactly as I wanted it to.

You can view the plug-in and download it here.

Comments are closed.