• Resolved Matt

    (@webmasterifcj)


    Hey guys,

    I have a custom field and wanted to know how one of my contributors can just type away and not have to worry about the paragraph creating a huge block of text.

    I would like this person to be able to type normally and when he or she hits the “Enter” button it will space regularly without them having to add any HTML tags.

    Thanks in advance.

Viewing 1 replies (of 1 total)
  • Thread Starter Matt

    (@webmasterifcj)

    Here is the code that i’m working with:

    add_action( 'admin_menu', 'my_create_post_meta_box' );
    add_action( 'save_post', 'my_save_post_meta_box', 10, 2 );
    
    function my_create_post_meta_box() {
    	add_meta_box( 'my-meta-box', 'Second Excerpt', 'my_post_meta_box', 'post', 'normal', 'high' );
    }
    
    function my_post_meta_box( $object, $box ) { ?>
        <p>
    		<label for="second-excerpt"><strong>Second Excerpt With Images for Post List Page</strong></label>
    		<textarea name="second-excerpt" id="second-excerpt" cols="60" rows="4" tabindex="30" style="width: 97%;"><?php echo wp_specialchars( get_post_meta( $object->ID, 'Second Excerpt', true ), 1 ); ?></textarea>
    		<input type="hidden" name="my_meta_box_nonce" value="<?php echo wp_create_nonce( plugin_basename( __FILE__ ) ); ?>" />
    	</p>
    <?php }
Viewing 1 replies (of 1 total)
  • The topic ‘Adding <p> breaks after paragraph’ is closed to new replies.