Add a Message Above or Below the Post Editor

New Editor Window Hooks

A couple of new hooks in WordPress 3.5 make it much simpler to hook in below both the post title box and the post editor. You can then use these functions to hook into these locations for whatever purpose you need.

In this quick example, I’m going to demonstrate how to use them to display simple messages, which can be very useful for displaying instructions on a client site, for example.

The result of using functions like this can be seen in the screenshot below:

New Editor Window Hooks

6 thoughts on “Add a Message Above or Below the Post Editor”

  1. Gregg Franklin says:

    Dave I think this could be really useful for a subtitle. Could you give an example? Not sure how you would create the form element for the subtitle field and then output it in a theme.

    1. That’s something else entirely. You’d need to use custom meta to save the information to the post and then output it to the theme using get_post_meta. This is simply for displaying messages (or performing other actions with the hook) above or below the editor in the dashboard only.

      1. Gregg Franklin says:

        I suspected it might require a metabox but I was hoping to use this hook to place the metabox in this location.

        1. Ahhh, well that you could certainly do. You might need to do some research to do it, but yes, you can use this hook to place the metabox in the desired location and then call upon that information in the theme.

  2. John says:

    Very interesting. Is there a way to make it closer to the title box

    1. Of course, using CSS you could put a negative top margin, or reduce the bottom margin on the title box.

Leave a Reply

7ads6x98y