FAQs

Knowledgebase Docs » ShiftNav » FAQs

How can I make the menu always open on desktops? 8

ShiftNav is an off-canvas menu, and as such it is designed only to display when toggled open by the user. If you would like to force the menu to be open at all times above a certain viewport width, you can add this CSS: You can change 960 in the media query to your desired breakpoint.

View

Disable ShiftNav on a specific page (or any custom condition) 10

ShiftNav is added to your site via the wp_footer hook, so removing it is as simple as unhooking that action. This is the PHP that will remove the main ShiftNav instance: To target a specific page, you’ll generally want to test for that page conditionally. In the following example, ShiftNav would be removed from page 1380: You can tailor the condition to your specific needs. Here’s a list of WordPress Conditional Tags Generally, this code works best in a child theme’s functions.php file To remove ShiftNav’s CSS and JS assets, you can use

View

How can I hide the “Loading ShiftNav…” / “ShiftNav is Waiting to Load…” message 8

ShiftNav introduced a javascript fallback in v1.4, which allows the plugin to recover in most cases even when other scripts on the site are malfunctioning. Since this has worked very well, this message has now been removed from the plugin in v1.5 When the page loads, you may see a flash of the message “Loading ShiftNav…” or “ShiftNav is Waiting to Load…” This message is only visible to logged in administrators. Your end users will never see it This message serves an important purpose. If there is a javascript error on your page, the message will remain, alerting you to this fact. Hovering over the message reveals more information: If the message disappears, then ShiftNav was able to initialize. If you really don’t want to see this message, you can add this custom CSS to hide it: If the message does not disappear, it means you either have a javascript error that prevents ShiftNav from loading, or else ShiftNav’s javascript was not run at all – which would indicate that either the resource is not being served properly, or your site is missing the wp_footer() hook and therefore not requesting the script at all.

View

How can I make the entire menu item toggle its submenu? 5

The ShiftNav menu item has two parts: the Link and the Submenu Activator (toggle) Each menu item is, by default, a Link to another page on your site. Therefore, tapping that Link will follow the link and redirect you to the relevant page on your site (standard hyperlink behavior). If you want the item to act as a toggle for the submenu, rather than a link to another page, then you can check the Disable Link setting on that menu item. Once the link has been disabled, the entire item can act as a toggle for the submenu, since there is no link to follow.

View