wordpress后台标题下添加自定义字段

add_action( 'edit_form_after_title', 'my_url_form_field' ); add_action( 'save_post', 'my_url_form_field_save' ); function my_url_form_field( $post ) { if ( $post->post_type != 'post' ) return; $format = get_post_format( $post->ID ); if ( !empty( $format ) && ( $format != 'link' ) ) return; ?> <div id="urlwrap"> <p> <label for="post-link-url"><strong>URL:</strong>< ...