在函数中添加此代码。php
add_action(\'admin_init\', \'wpse_87339_admin_init\');
function wpse_87339_admin_init() {
wp_enqueue_script(\'wpse_87339_admin\', get_stylesheet_directory_uri() . \'/js/admin.js\', array(\'jquery\'));
}
并创建新的js文件名admin。js,然后在其中添加以下代码
jQuery(document).ready(function($) {
// Remove all .postbox classes from sidebar
$(\'#side-sortables .postbox\').removeClass(\'postbox\');
// Remove .postbox from specific metabox (page attributes)
$(\'#pageparentdiv\').removeClass(\'postbox\');
});