admin管理员组文章数量:1292702
I have added few pages to handle edit, view page that is should not be accessed from wp-admin navigation menu and its a success. But now on my menu, I have empty space as sub-menu.
Below are my codes to add pages.
add_submenu_page('iuser_dashboard_page', 'Edit iUser', null, 'manage_options', 'i_edit_user', 'IEdit_User');
add_submenu_page('iuser_dashboard_page', 'User membership detail', '', 'manage_options', 'view_user_membership_detail', 'view_user_membership_detail');
add_submenu_page('iuser_dashboard_page', 'User enrollment', '', 'manage_options', 'view_user_enrollment', 'view_user_enrollment');
But how to remove the empty submenu from the navigation menu?
Thank you in advanced.
Edit for answer:
Not able to use CSS to hide it. so I use JQuery instead.
$( document ).ready(function() {
$('a:empty').css('display', 'none');
});
本文标签: How to remove empty menu space when creating admin page without menu title using addsubmenupage
版权声明:本文标题:How to remove empty menu space when creating admin page without menu title using add_submenu_page 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741563727a2385598.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论