Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have two custom post types created (using Types plugin) with a bunch of custom fields.

I need to add a help information, instructions for admins that will show at the top of add new/edit CPT page of dashboard.

How can I add a text visible only on those two pages (add/edit post type 1 and add/edit post type 2)?

share|improve this question

4 Answers 4

You can add the help text above the meta boxes in the Edit Screens easily when using a plugin like ACF or Types.

share|improve this answer

Accomplish it by using edit_form_top hook. Code -

add_action('edit_form_top', 'wpse128204_edit_form_top');
function wpse128204_edit_form_top( $post )
    if( in_array( $post->post_type, array( 'post type 1', 'post type 2' ) ) ){
        // You want to do something here
share|improve this answer
Why not be more specific for each specific meta box and add the specific help text above each one using the plugin settings. – Brad Dalton Jan 1 '14 at 14:40

You can also add meta boxes with the content, which help the users. This is more useful. The writers can hide this box and set their personal options to hide the hints from you, if is not necessary for the writers. To add the boxes to the different post type use the specific hooks: add_meta_boxes_xxx, xxx is for the post type 1 and post type 2.

Small hint to identifier hooks use the plugin Debug Objects, list Hooks and screen info to find the right anchor.

A screenshot say more, how I find the hook. enter image description here

share|improve this answer

Try this:

function options_instructions_example() {
    global $my_admin_page;
    $screen = get_current_screen();

    if ( is_admin() && ($screen->id == 'custom_post_type_name') ) {

        function add_content_after_editor() {
            global $post;
            $id = $post->ID;
            echo '<div class="postbox" style="background:#0074a2;color:#fff;margin-top:20px;"><div class="inside">';
            echo 'Instructions go here.';
            echo '</div></div>';
        add_action( 'edit_form_after_title', 'add_content_after_editor' );
![enter image description here][1]add_action( 'admin_notices', 'options_instructions_example' );

It will result in something that looks similar to this:

share|improve this answer
Please add an explanation to your answer: why could that solve the problem? – toscho Mar 27 at 22:13
An instruction box now appears on that page at least close enough to the top that someone will read it first. – Adam Baney Oct 9 at 20:58

Your Answer


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.