Including line breaks when outputting theme options
Question
I have the following in my theme-options.php
as an address field:
<?php
/**
* Address
*/
?>
<tr valign="top"><th scope="row"><?php _e( 'Address', 'weare000theme' ); ?></th>
<td>
<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>
</td>
</tr>
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:
<?php
$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?
0
2 months
0 Answers
12 views
0
Leave an answer
You must login or register to add a new answer .