Stop Expansion of Top Level Menu in the WordPress Admin Sidebar

Question

Can anyone tell me how to stop the top level menu items in the WordPress Admin sidebar auto-expanding when that top level item is clicked, or a submenu item chosen from the fly-out menu?

For clarity, I’m not talking about the left/right expansion/collapse of the sidebar menu itself, but the up/down expansion to show submenu level items. e.g. The sidebar shows

Posts : Pages : Appearance : Tools : Settings : … etc.

If I hover over “Appearance”, the submenu items are presented as a fly-out, allowing me to click on one. However, when I do, or if I click on “Appearance” itself, that item auto-expands so that the sidebar now shows

Posts : Pages : Appearance – Themes – Widgets – Background : Tools : Settings : … etc.

I want it to not expand on selection of a top level or sub menu item. I’ve searched Google and specialist sites like this one several times for an answer but can’t find one. Plenty about expanding / collapsing the sidebar itself but only one about top level / submenu expansion. The proposed solution there (call to a javascript function) did not work for me.

Although it’s trivial in the scheme of things, being unable to find the answer is starting to really frustrate me every time it does it!

Many thanks in anticipation.

--------------------------------------------------

>>> Share a link to this question, just copy and paste the code bellow on your web page <<<

<a href="https://www.wptricks.com/question/stop-expansion-of-top-level-menu-in-the-wordpress-admin-sidebar/">

Stop Expansion of Top Level Menu in the WordPress Admin Sidebar</a>
0
, , , Kevin4fm 4 weeks 0 Answers 21 views 0

Leave an answer