WordPress tip: add a notice to the post editor screen

Often corporate or news WordPress sites are managed by people who don’t really know WordPress. They can run into problems when publishing posts. A short notice on the post editor screen is very helpful. The sample code below is what our editors use; it saves us from repeating the same instructions over and over.

Copy the snippet below into functions.php, tweak the message you need, and save.

function wptutsplus_text_after_title( $post_type ) { ?>
    <div>
        <h3>Using this screen</h3>
        <div>
            <p>请注意使用h2和strong标签,不要堆砌关键词,需要在栏目页显示图片的,请添加特色图像。</p>
        </div><!-- .inside -->
    </div><!-- .postbox -->
<?php }
add_action( 'edit_form_after_title', 'wptutsplus_text_after_title' );

Leave a Reply

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