Including line breaks when outputting theme options


I have the following in my theme-options.php as an address field:

                 * Address
                <tr valign="top"><th scope="row"><?php _e( 'Address', 'weare000theme' ); ?></th>
                        <textarea id="weare000_theme_options[contact-address]" class="large-text" cols="50" rows="10" name="weare000_theme_options[contact-address]"><?php echo esc_textarea( $options['contact-address'] ); ?></textarea>
                        <label class="description" for="weare000_theme_options[contact-address]"><?php _e( '', 'weare000theme' ); ?></label>

And then at the bottom of the file I have this:

// Say our textarea option must be safe text with the allowed tags for posts
    $input['contact-address'] = wp_filter_post_kses( $input['contact-address'] );`

I am then outputting the value in my theme like so:

    $options = get_option('weare000_theme_options');
<?php echo $options['contact-email']; ?>

I would like to retain the linebreaks however, rather than outputting just one line of text

Is this possible?

pealo86 2 months 0 Answers 12 views 0

Leave an answer