Adding Help Tabs To Custom Post Types

Use this code for solve your Problem.

function custom_help() {
    global $post_ID;
    $screen = get_current_screen();

    if( isset($_GET['post_type']) ) $post_type = $_GET['post_type'];
    else $post_type = get_post_type( $post_ID );

    if( $post_type == 'listing' ) :

    $screen->add_help_tab( array(
        'id' => 'you_custom_id', // unique id for the tab
        'title' => 'Custom Help', // unique visible title for the tab
        'content' => '<h3>Help Title</h3><p>Help content</p>', //actual help text
    ));

    $screen->add_help_tab( array(
        'id' => 'you_custom_id_2', // unique id for the second tab
        'title' => 'Custom Help 2', // unique visible title for the second tab
        'content' => '<h3>Help Title 2</h3><p>Help content</p>', //actual help text
    ));

    endif;

}

add_action('admin_head', 'custom_help');

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)