Text Area

Description

The Textarea field creates a basic textarea input, useful to store simple (unstyled) paragraphs of text to use in your theme.

Screenshots

Changelog

  • Formatting setting removed in version 5.0.0.
  • Rows setting added in 4.3.5.

Settings

  • Default Value
    The default value shown when creating a new post.

  • Rows
    Sets the height of this field.

  • New Lines
    Changes the way new lines are formatted. Selecting “Automatically add paragraphs” will add paragraph tags around the value. Selecting “Automatically add <br>” will convert any new lines to HTML line breaks. Selecting “No formatting” will not convert any tags and you will see any HTML displayed as normal text similar to regular content.

Template usage

Display value with paragraphs automatically added.

This example demonstrates how to display a Textarea field named “product_description” when the Automatically add paragraphs setting is enabled.

<h3>Product Description</h3>
<?php the_field('product_description'); ?>

Display value without formatting.

This example demonstrates how to display a Textarea field named “product_description” when No formatting setting is enabled.

<h3>Product Description</h3>
<p><?php the_field('product_description'); ?></p>

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.