Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'd like to add some descriptive text underneath the page title on both the list and edit post screens for the default post and also custom post types - e.g. "Below is a list of your recent blog posts."

What's the best way to do this?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

If you are OK with using javascript, you can try the following in your functions.php file:

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
    }
}
share|improve this answer
    
Thanks - this works great! –  fxfuture Oct 1 '10 at 21:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.