Normal WordPress behavior is for widget items to appear on all website pages. Widget logic allows you to create sidebar widgets that only appear on the pages you want them on. This can be helpful for a multitude of situations, for example, creating custom menus that only appear next to the pages you specify.

Use the following steps to create a submenu for any page:

  1. From the menu editor, create a new menu using the ‘create new menu’ link. image00
  2. Name the menu something relating to the page it will appear on.
  3. Add all the pages you would like to appear on this menu and click ‘save menu’ or ‘create menu’ your completed menu should look something like this:image01
  4. You now have a menu that can be attached to any page you specify. To attach it you will need to navigate to Appearance>widgets.
  5. From the left side of widgets editor, click and drag the item ‘custom menu: stacked pills’ into the ‘primary sidebar’ area. You will probably want to place it at the very top.
  6. At first placement the settings for this new widget will be empty, you will need to configure the settings as follows (refer to image below)
  7. Write a title for your submenu widget
  8. Select the menu from the dropdown that you just created in the menu editor.image02
  9. Enter the following code: is_page(‘your-page’) replace ‘your-page’ with the permalink for the page you want this new item to appear beside.