Knowledgebase Docs » ShiftNav » Instances

Secondary Instances [Pro] 4

With ShiftNav Pro, you can add as many ShiftNav panels as you like. Each panel can have its own menu and custom content, and can be controlled independently via the ShiftNav Control Panel. Each ShiftNav instance is given its own tab in the ShiftNav Settings Panel. ShiftNav instance settings tabs are designated with the + prefix.


Setting the menu for a ShiftNav instance [Pro] 1

While a special ShiftNav [Main] theme location is created for the main ShiftNav Instance, this is not the case for secondary instances. For a secondary ShiftNav Instance, the menu is assigned via the special settings panel for that instance. You can assign a menu either directly, or via a theme location. Assigning a menu directly To assign a specific menu you have created in Appearance > Menus to a ShiftNav instance: 1. Go to Appearance > ShiftNav 2. Click the +{instance_name} tab for your ShiftNav instance 3. Select the menu you wish to display under Display Menu and save the changes. 4. Applying this setting will override the Theme Location setting. Assigning a menu via a theme location To assign a menu via a theme location to a ShiftNav instance: 1. Go to Appearance > ShiftNav 2. Click the +{instance_name} tab for your ShiftNav instance 3. Select the theme location you wish to display under Theme Location and save the changes. 4. If you have not already done so, visit Appearance > Menus > Manage Locations and assign a menu to your chosen theme location. If you set the Display Menu setting, this setting will be ignored. ShiftNav does not automatically create new Theme Locations for each ShiftNav instance. If you wish to create new theme locations without adding PHP code, you can use the free Menu Swapper plugin


Adding a ShiftNav Instance [Pro] 1

To add a new ShiftNav panel, go to Appearance > ShiftNav. 1. Click the green + Add ShiftNav Instance button in the upper right corner. 2. Give your new instance an ID. IDs should only include letters, hyphens, and underscores. If you include invalid characters, your ID will be automatically sanitized. 3. Click Create Instance. Your new instance will be created. To see the instance, click the Refresh Page button. If you have changes that you need to save before refreshing, click close and save your changes. 4. When the page is refreshed, you will see a new tab appear, labeled +{your_instance_name} Click the tab to view the options for your new panel. 5. Assign a menu to use for this panel. Either assign a menu directly via Display Menu or via a Theme Location. Both are set in the image only for illustrative purposes; in practice, setting both would be pointless as only one can work at a time, and Display Menu takes precedence. 6. Add a toggle to your theme template or page content to provide users a way to open and close the panel. The appropriate toggle code for that instance is provided at the top of the tab. 7. Configure the remaining settings to your liking


Toggling Secondary Instances [Pro] 0

The main toggle bar that appears in ShiftNav will always toggle the main ShiftNav instance. To toggle a secondary instance, you can use the generated toggles in the ShiftNav instance panel and insert them in your theme templates or page content. For more information, see the Toggles section of the Knowledgebase.