我知道这是一个老话题,但它可能会帮助其他需要它的人。在…内functions.php 添加以下内容:
add_action( \'in_admin_header\', \'my_header\' );
function my_header()
{
if ( current_user_can( \'subscriber\' ) ) { // If user is subscriber, remove the IF statement for all users.
include(\'../wp-content/themes/YOUR_TEMPLATE_NAME/header.php\'); // Adding header.php
echo \'<style>body {background: #fff;}</style>\'; // Adding some styles, .css file can also be added here.
}
}