有一个钩子叫edit_form_after_title 这似乎是为这个案子设计的。加上一个自定义的元字段应该可以做到这一点。
function after_title_cb($post) {
  $af = get_post_meta($post->ID,\'_after_title\',true);
  echo \'<input id="aftertitle" name="_after_title" value="\'.$af.\'">\';
}
add_action(\'edit_form_after_title\',\'after_title_cb\');
function save_after_title( $post_id ) {
  $mydata = (!empty($_POST[\'_after_title\'])) 
    ? wp_kses($_POST[\'_after_title\'])
    : \'\';
  update_post_meta( $post_id, \'_after_title\', $mydata );
}
add_action( \'save_post\', \'save_after_title\' );
 如果您愿意,您甚至可以将整个内容包装在标准的metabox中。
function after_title_cb($post) {
  $af = get_post_meta($post->ID,\'_after_title\',true);
  echo \'<input id="aftertitle" name="_after_title" value="\'.$af.\'">\';
}
function add_before_editor($post) {
  global $post;
  add_meta_box(
    \'generic_box\', // id, used as the html id att
    __( \'Text Only Content\' ), // meta box title
    \'after_title_cb\', // callback function, spits out the content
    \'post\', // post type or page. This adds to posts only
    \'pre_editor\', // context, where on the screen
    \'high\' // priority, where should this go in the context
  );
  do_meta_boxes(\'post\', \'pre_editor\', $post);
}
add_action(\'edit_form_after_title\',\'add_before_editor\');
function save_after_title( $post_id ) {
  $mydata = (!empty($_POST[\'_after_title\'])) 
    ? wp_kses($_POST[\'_after_title\'])
    : \'\';
  update_post_meta( $post_id, \'_after_title\', $mydata );
}
add_action( \'save_post\', \'save_after_title\' );
 在前端,您可以抓取并显示如下值:
// careful with $post
// This must be in a Loop to be reliable
$af = get_post_meta($post->ID,\'_after_title\',true); 
if ( !empty($af) ) { 
  echo $af;
}