Support » Fixing WordPress » contextual_help to all edit pages

Viewing 4 replies - 1 through 4 (of 4 total)
  • The below is what I use to add contextual help to the edit/new page for a post type called ‘news’. All you should have to do is identify the name of the screen name of the post types (probably just ‘post’ and ‘page’) and change text to what you want.

    add_filter('contextual_help', 'help_text', 10, 3);
    function help_text($contextual_help, $screen_id, $screen){
    		case 'news':
    			$contextual_help =
    				'<p>' . __('Things to remember when adding or editing an article:') . '</p>' .
    				'<ul>' .
    				'<li>' . __('Specify the correct news type so that the correct articles are displayed under the correct news types on the website.') . '</li>' .
    				'<li>' . __('Ensure that the text is displayed correctly by viewing or previewing the article before moving on.') . '</li>' .
    				'</ul>' .
    				'<p>' . __('If you want to schedule a article to be published in the future:') . '</p>' .
    				'<ul>' .
    				'<li>' . __('Under the Publish module, click on the Edit link next to Publish.') . '</li>' .
    				'<li>' . __('Change the date to the date to actually publish this article, then click on Ok.') . '</li>' .
    				'</ul>' .
    				'<p><strong>' . __('For more information:') . '</strong></p>' .
    				'<p>' . __('<a href="" target="_blank">Edit Posts Documentation</a>') . '</p>' .
    				'<p>' . __('<a href="" target="_blank">Support Forums</a>') . '</p>' ;

    Hello duck__boy,
    thankyou for reply but the code replace the default wp help…

    This code replace the default wp help, I need to add my code before or after…

    function my_custom_help($contextual_help, $screen_id, $screen) {
    	if ($screen_id == 'page' || $screen_id == 'post'  ) {
    		$contextual_help = '<p><b>This is my custom help text</b></p>';
    	return $contextual_help;
    add_filter('contextual_help', 'my_custom_help', 10, 3);

    Change one line:
    $contextual_help .= '<p><b>This is my custom help text</b></p>';

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘contextual_help to all edit pages’ is closed to new replies.