This question already has answers here: WordPress Left Hand Side Admin Menu Always Collapsed (3 answers) Closed 7 years ago.admin管理员组文章数量:1326320
I would like the backend left menu sidebar be collapsed by default. Yes, I can click the "Collapse menu" button every time but is there a way to have WP open up every time with it collapsed by default?
I tried this solution but it didn't work for me: How to Make admin Sidebar Menu always be Collapse by code
I'm also trying to apply this to a multisite website, not sure if that's why the code from the link didn't work.
Any ideas on how to achieve this?
This question already has answers here: WordPress Left Hand Side Admin Menu Always Collapsed (3 answers) Closed 7 years ago.I would like the backend left menu sidebar be collapsed by default. Yes, I can click the "Collapse menu" button every time but is there a way to have WP open up every time with it collapsed by default?
I tried this solution but it didn't work for me: How to Make admin Sidebar Menu always be Collapse by code
I'm also trying to apply this to a multisite website, not sure if that's why the code from the link didn't work.
Any ideas on how to achieve this?
Share Improve this question edited Apr 13, 2017 at 12:37 CommunityBot 1 asked Mar 29, 2017 at 9:09 TrebTreb 811 silver badge9 bronze badges 01 Answer
Reset to default 1The following works with a regular site. I have't worked with multisite yet, but I imagine it should be something along the same line:
function change_user_settings() {
set_user_setting('mfold', 'f'); //Missing "t" typo caused fatal error
}
add_action('admin_init', 'change_user_settings');
本文标签: Backend menu sidebar collapsed by default every time
版权声明:本文标题:Backend menu sidebar collapsed by default every time? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742204054a2432485.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论