WP Smith

Creating WordPress & Genesis Websites Since 2010

  • Home
  • About
  • Services
  • Blog
  • Contact

Dec 27 2011

Adding Contextual Help Tab to Edit/Add New Post/Page

It is fairly simple and straightforward on how to add contextual help tabs to various admin pages, and with the imminent advent of Genesis 1.8, adding contextual help will be as simple as a help() method. There are also a wide variety of great tutorials on how to add contextual help to admin pages, such as Justin Tadlock's Adding contextual help to plugin and theme admin pages.

However, there aren't any tutorials (at least that I could find) on how to add contextual help to edit/add-new post pages. So while I believe this may not be the best way to do this, it works! Being a pragmatist, it works for me!

[php]
// Add contextual help
add_action( 'add_meta_boxes' , 'wps_help' , 10 , 2 );
function wps_help ( $post_type , $post ) {
if ( 'page' == $post_type ) {
$my_help_tab_content = '<p>' . __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam varius iaculis dui, eu ultricies velit consectetur pellentesque. Phasellus tortor mi, tempor eget pulvinar eu, sollicitudin ut eros. Quisque fermentum dolor elit. Aenean varius nisi placerat lectus elementum fringilla. Aenean at augue mauris, eu euismod mauris. Integer ac eros in ligula pharetra pretium. Pellentesque vel orci nibh. Pellentesque gravida velit ac lacus egestas eget imperdiet metus egestas. Maecenas tellus ligula, molestie ac pharetra id, tristique eu velit. Phasellus id quam in mi tristique gravida eget in quam. Cras ornare leo sed dui lobortis congue.') . '</p>';

get_current_screen()->add_help_tab( array(
'id' => 'my-help-id',
'title' => __( 'My Help Tab' ),
'content' => $my_help_tab_content,
) );
}
}
[/php]

Written by Travis Smith · Categorized: WordPress

StudioPress Premium WordPress Themes     WP Engine Managed WordPress Hosting

What can I do for you!?

Custom Development

We develop plugins by determining both business/functional and technical requirements, following WordPress development best practices, and using agile methodology to ensure you get the best solution.

Consulting

Have questions? Need a reliable developer to consult? Please contact us today!

Customized Theme

We can customize your theme or child theme, or create a child theme for you based on your needs while enhancing the performance of every individual attribute.

Customized Plugin

We can customize your plugins, extend plugins (e.g., Gravity Forms, Jetpack, Soliloquy) based on your needs ensuring security, performance, and positive business impact.

Contact Us

About Travis Smith

As a WordPress enthusiast, developer, and speaker, Travis writes about what he learns in WordPress trying to help other WordPress travelers, beginners and enthusiasts with tutorials, explanations, & demonstrations.

Comments

  1. Pippin says

    December 27, 2011 at 1:14 pm

    Great tip Travis. This actually comes at the perfect time for me because I had couple users asking how to do this on the tutorial I wrote on the subject. One thing you should note, however, is that this does not work in any version less than 3.3.

    Reply
    • Travis Smith says

      December 27, 2011 at 1:30 pm

      Yes Pippin, that is correct!

      Reply
  2. cipto hadi says

    September 14, 2012 at 8:03 am

    Thank you very much, Mr. Travis. I had been around find nothing that can help me create help tab for my custom post admin page, but your article help me so much. ^_^.
    Before I found your post, I did hack on wp-admin/edit.php

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • Twitter
  • Facebook
  • LinkedIn
  • Google+
  • RSS

Copyright © 2025 � WP Smith on Genesis on Genesis Framework � WordPress � Log in