Text Block

The Text Block is a component for displaying a series of structured text items, each with its own heading and paragraph. It includes options for text alignment and full-width display.


Content Editor Fields

General Settings

  • Heading Alignment:

    • Description: Controls the horizontal alignment of the content within the block.
    • Options:
      • align-centre (Default)
      • align-left
      • align-right
    • Usage: Select the desired text alignment for the entire block.
    • Requirement: Optional.
  • Full Width:

    • Description: A toggle to determine if the block should span the full width of the page or be constrained to the standard container width.
    • Usage: Enable this to make the text block stretch across the entire viewport width.
    • Requirement: Optional.

Content Fields

  • Content (Repeater):
    • Description: A list for adding structured content blocks, each with its own heading and paragraph.
    • Usage: Use this for detailed points where each has its own title and description.
    • Requirement: Optional.
    • Fields (per item):
      • Text Heading: The heading for the content item.
      • Text Excerpt: The paragraph/body text for the content item.

Example Usage:

Steps:

  1. Add the block: Insert the Text Block into your page.
  2. Configure Settings:
    • Choose a Heading Alignment (e.g., align-centre).
    • Decide if you need Full Width and toggle it on or off.
  3. Add Content:
    • In the Content section, click "Add Row" and fill in the Text Heading and Text Excerpt for your first item.
    • Repeat for all items you wish to add.
  4. Save the Page: The block will now render your text content with the chosen layout settings.

Preview with image:

form with image

Editor preview:

form acf


Result:

The block will render a text section with the specified alignment and width. It will display a series of headings and paragraphs based on the items added to the "Content" repeater.

Benefits:

  • Structured: Perfect for presenting information that follows a consistent heading-and-paragraph format.
  • Customizable: Provides simple but effective controls for alignment and width.
  • Clean Presentation: Ideal for presenting text-heavy information in an organized and readable format.
  • Content-Driven: Automatically handles empty fields, ensuring no broken or empty elements appear on the front end.

Conclusion:

The Text Block is a straightforward and effective tool for adding structured text sections to any page. It is best used for lists of features, definitions, or any content that benefits from a repeating heading/description pattern.