Title: Textarea line breaks
Last modified: August 30, 2016

---

# Textarea line breaks

 *  Resolved [Youngbloodr77](https://wordpress.org/support/users/youngbloodr77/)
 * (@youngbloodr77)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/textarea-line-breaks/)
 * Hi all,
 * My Kirki textarea doesn’t recognise line breaks. I’ve tried the two white spaces
   at the end of each line. Any suggestions?
 * Thanks
 * [https://wordpress.org/plugins/kirki/](https://wordpress.org/plugins/kirki/)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [Ari Stathopoulos](https://wordpress.org/support/users/aristath/)
 * (@aristath)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/textarea-line-breaks/#post-6848043)
 * How are you getting the value?
    Are you filtering it somehow? Can you please 
   post the code you’re using to echo the textarea’s contents in your theme/plugin?
 *  Thread Starter [Youngbloodr77](https://wordpress.org/support/users/youngbloodr77/)
 * (@youngbloodr77)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/textarea-line-breaks/#post-6848049)
 * Hi Aristeides,
 * Thanks for getting back to me. I’m currently using the standard way (I think)
   of calling the custom value.
 * Setting my textarea field like so
 * $fields[] = array(
    ‘type’ => ‘textarea’, ‘settings’ => ‘footer_site_info’, ‘
   label’ => __( ‘Footer Site Info’, ‘troubleshoota’ ), ‘section’ => ‘footer_general’,‘
   default’ => ”, ‘priority’ => 20 );
 * Calling the field like so:
 * <?php echo get_theme_mod( ‘footer_site_info’, ” ); ?>
 * Cheers
 *  [Ari Stathopoulos](https://wordpress.org/support/users/aristath/)
 * (@aristath)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/textarea-line-breaks/#post-6848071)
 * Try this:
    `<?php echo html_entity_decode( get_theme_mod( 'footer_site_info',''));?
   >`
 *  Thread Starter [Youngbloodr77](https://wordpress.org/support/users/youngbloodr77/)
 * (@youngbloodr77)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/textarea-line-breaks/#post-6848073)
 * Thanks for taking the time to look into this. Unfortunately still not recognising
   line-breaks sorry.
 *  [Ari Stathopoulos](https://wordpress.org/support/users/aristath/)
 * (@aristath)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/textarea-line-breaks/#post-6848079)
 * What if you add your field like this:
 *     ```
       $fields[] = array(
       	'type'              => 'textarea',
       	'settings'          => 'footer_site_info',
       	'label'             => __( 'Footer Site Info', 'troubleshoota' ),
       	'section'           => 'footer_general',
       	'default'           => '',
       	'priority'          => 20,
       	'sanitize_callback' => 'esc_html',
       );
       ```
   
 * and then call the value using
 *     ```
       echo html_entity_decode( get_theme_mod( 'footer_site_info', '' ) );
       ```
   
 *  Thread Starter [Youngbloodr77](https://wordpress.org/support/users/youngbloodr77/)
 * (@youngbloodr77)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/textarea-line-breaks/#post-6848080)
 * Still no luck sorry. I take it this works fine on your side?
 * Thanks for your patience Aristeides.
 *  [Dimitris Kalliris](https://wordpress.org/support/users/fovoc/)
 * (@fovoc)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/textarea-line-breaks/#post-6848091)
 * Hey there,
 * I tried to resolve this by using the [wpautop](https://codex.wordpress.org/Function_Reference/wpautop)
   function like this:
 * `<?php echo wpautop( get_theme_mod( 'footer_site_info', '' ) ); ?>`
 * Could this be a working solution for you?
 * Please advise,
    Dimitris
 *  Thread Starter [Youngbloodr77](https://wordpress.org/support/users/youngbloodr77/)
 * (@youngbloodr77)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/textarea-line-breaks/#post-6848093)
 * Nice!!! That did the trick.
 * Thanks a bunch to both of you for your input on this one.
 * Matt

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Textarea line breaks’ is closed to new replies.

 * ![](https://ps.w.org/kirki/assets/icon-256x256.jpg?rev=3518366)
 * [Kirki – Freeform Page Builder, Website Builder & Customizer](https://wordpress.org/plugins/kirki/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/kirki/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/kirki/)
 * [Active Topics](https://wordpress.org/support/plugin/kirki/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/kirki/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/kirki/reviews/)

 * 8 replies
 * 3 participants
 * Last reply from: [Youngbloodr77](https://wordpress.org/support/users/youngbloodr77/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/textarea-line-breaks/#post-6848093)
 * Status: resolved