如何从“ Adrerance”菜单中删除唯一的主题选项
我想从WordPress仪表板中的“外观”菜单中删除主题选项。我要删除的选项标记为红色。
我已经尝试过,
remove_menu_page( 'themes.php' );
但是它完全删除了外观菜单。
我找到了另一个可以删除子菜单的功能,但不确定第二个选项必须是什么,因为外观和主题都链接到wp-admin/themes.php
remove_submenu_page( 'themes.php', '')
I want to only remove the Themes option from the Appearance menu in the WordPress dashboard. The option I want removed is marked in red.
I have tried,
remove_menu_page( 'themes.php' );
But it removed the Appearance menu completely.
I found another function to remove the sub menu but unsure what the second option has to be since both Appearance and Themes are linked to wp-admin/themes.php
remove_submenu_page( 'themes.php', '')
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这将做到。添加到功能文件:
This will do it. Add to functions file: