Hide dashboard menu on desktops only?

How to hide dashboard menu on desktop but show it for mobiles?

  • Ken Kimbrell
    • The Crimson Coder

    Hello Niki-

    Not sure if this is your exact desired result. However, if you scroll to the bottom of the wordpress dashboard on your desktop, there is an option collapse the menu. See visual representation below:

    Let me know how this works for you!

    Take Care,

    Ken – WPMU DEV Support

  • Niki
    • WPMU DEV Initiate

    I was aware of that but thanks…

    I already found functions.php code to remove, hide collapse or have it folded by default…

    I need it like this :

    User logs in using dektop browser = dashboard menu totally hidden

    User logs in using his phone = dashboard is visible

    Here are some functions that work but i want it to be visible on mobiles.

  • Ken Kimbrell
    • The Crimson Coder

    Hello Niki-

    Unfortunately you can’t hide the admin menu with the use of CSS, so Media Queries would not be an option. Also unless you created conditionals that would effect all roles, including admin. Is the ultimate goal to restrict menu-item access from different roles when they visit the dashboard? Or you just want a function that detects the viewport and if on a desktop hides the admin menu completely, irregardless of the user’s role, then displays again when user gets under a 1080px viewport width?

    Let me know how I can help!

    Take Care,

    Ken – WPMU DEV Support

  • Niki
    • WPMU DEV Initiate

    I have navigation page (not responsive) with all the dashboard icons and they open in minimized windows inside the dashboard. Plus admin bar on top but its hidden on mobile…

    So I don`t need dashboard menu on the right for me or the user in desktop version .

    I am ok with affecting all roles on desktop as long as it displays again in mobile.

  • Ken Kimbrell
    • The Crimson Coder

    Hello Nikki-

    Are you building your site in an local environment? If so can you please provide screen shots of your navigation page, so I can see how it looks along with the dashboard icons you are referring to. Also show me how the site is displayed in mobile versions, so I can have a better understanding of what you are trying to accomplish. I hate to begin hardcoding without knowing the overall scope of your project. I do apologize for any type of reiteration you do. I just want to have a full understanding. If the site is live, could you please provide me a url address?

    furthermore, if you have our dashboard plugin loaded and are working in a live environment.

    Could you please grant us temporary support access to your website so we can have a better look of your setup and settings? You can grant us access via WPMUDEV Dashboard plugin, there’s no need to share credentials. Here’s our detailed documentation page about it:

    https://premium.wpmudev.org/docs/getting-started/getting-support/#chapter-4

    We’ll wait for your confirmation reply here, as we don’t get any notification when a member is granting us support access. We could then dig in and further investigate this!

    Take Care,

    Ken – WPMU DEV Support

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.