如果可以使用javascript,可以在functions.php
文件:
add_action(\'admin_footer\', \'my_admin_footer\');
function my_admin_footer()
{
$uri = isset($_SERVER[\'REQUEST_URI\']) ? $_SERVER[\'REQUEST_URI\'] : NULL ;
$message = NULL;
if ($uri AND strpos($uri,\'edit.php\'))
{
if (strpos($uri,\'post_type=page\'))
{
$message = \'My custom message for page list\';
}
else
{
$message = \'My custom message for post list\';
}
}
elseif ($uri AND strpos($uri,\'post-new.php\'))
{
if (strpos($uri,\'post_type=page\'))
{
$message = \'My custom message for add/edit page\';
}
else
{
$message = \'My custom message for add/edit post\';
}
}
elseif ($uri AND strpos($uri,\'post.php\'))
{
$message = \'My custom message for add/edit post or page\';
}
if ($message)
{
?><script>
jQuery(function($)
{
$(\'<div style="margin-bottom:15px; color:#999;"></div>\').text(\'<?php echo $message; ?>\').insertAfter(\'#wpbody-content .wrap h2:eq(0)\');
});
</script><?php
}
}