Support » Plugin: ShiftNav - Responsive Mobile Menu » How to Force Mobile Menu

  • Resolved Sang


    Hi Chris —

    Is there any way to programmatically force the shiftnav MOBILE menu to render for specific pages/post types?

    We are successfully using your plugin for mobile menus at a specific pixel breakpoint that is configured in the Shiftnav config screen. But we have a custom post type that we want displayed ALWAYS with the mobile menu/hamburger menu option regardless of device/screen width.

    We are loading a header-custom.php file for this custom post type’s template…any way we can accomplish this without having to create/manage a completely separate nav menu?

    We could prob use CSS to hide the primary nav, and force the hamburger menu to show…and then use your .shiftnav( ‘openShiftNav’ ) and .shiftnav( ‘closeShiftNav’ ) JS API calls to show/hide the shiftnav menu — would this be an acceptable approach? Any other recommendations that you might have would be appreciated.


Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author sevenspark


    Hi Sang,

    So there are two pieces to ShiftNav: the toggle and the panel.

    The panel is always present, and is always ready to be toggled into view.

    The toggle is hidden above the breakpoint you set with display:none.

    So it’s really just a matter of revealing that toggle. I suspect the simplest solution will be to just add


    in your custom header to force the toggle to display.

    Another option would be to add a custom toggle in your custom header – but I think the CSS solution is simplest if that does it for you.

    Hope that helps!


    Super — thanks for the clarification. Great plugin.

    Plugin Author sevenspark


    You’re welcome, glad you’re enjoying the plugin! 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to Force Mobile Menu’ is closed to new replies.