2

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?

I need to make add a list of instructions as in:

xxxx 2. xxxxx 3. xxxx

I'm guessing I'll need to add html for this?

And ideally I can change the font and make it bold.

Thanks!

This is the text I need:

"To add a video, you need to make sure that the video is first uploaded to Youtube or Vimeo or Google Videos.

  1. In the 'Video Embed Code', enter the video embed code (http://support.google.com/youtube/bin/answer.py?hl=en&answer=171780) The thumbnail will Automatically be added
  2. Enter title and text in the main panel below
  3. Choose which continent and category that is most fitting for your video
  4. Press "Publish"

1 Answer 1

2

It's not that hard, you can use the all_admin_notices-hook, which appears beneath the Post Updated/Saved, etc. messages box.

Wrapped up in a plugin:

<?php
! defined( 'ABSPATH' ) AND exit;
/** Plugin Name: (#64933) »kaiser« Add post/page note */

function wpse64933_add_posttype_note()
{
    global $post, $pagenow;

    // Abort in certain conditions, based on the global $pagenow
    if ( ! in_array(
         $pagenow
        ,array(
             'post-new.php'
            ,'post.php'
         )
    ) )
        return;

    // Abort in certain conditions, based on the global $post
    if ( ! in_array(
         $post->post_type
        ,array(
             'post'
            ,'page'
         )
    ) )
        return;

    // You can use the global $post here
    echo '<p>HELLO WORLD!</p>';
}
add_action( 'all_admin_notices', 'wpse64933_add_posttype_note' );
3
  • 1
    +1 for Abort in certain conditions
    – Igor Parra
    Nov 21, 2012 at 11:26
  • 1
    add_action( 'admin_notices', 'wpse64933_add_posttype_note' ); also possible and displayed underneath a page title when given notice notice-info like CSS classes. see: developer.wordpress.org/reference/hooks/admin_notices Sep 16, 2022 at 9:23
  • @AndréKelling Feel free to file an edit.
    – kaiser
    Sep 16, 2022 at 9:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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