# Block Pattern: Three Testimonials

> Adds a testimonials pattern with three customer quotes side by side, built from core Quote blocks so it inherits your theme's quote styling.

- Type: PHP
- Runs: Run everywhere
- Category: [Block Editor](https://wpide.com/library/category/gutenberg/)
- Tags: patterns, testimonials, quotes
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/pattern-testimonials-three/

## Code

```php
add_action( 'init', function () {
    if ( ! function_exists( 'register_block_pattern' ) ) {
        return;
    }

    if ( ! WP_Block_Pattern_Categories_Registry::get_instance()->is_registered( 'wpide-sections' ) ) {
        register_block_pattern_category( 'wpide-sections', array( 'label' => 'Site Sections' ) );
    }

    $quotes = array(
        array( 'They rebuilt our site in two weeks and sales went up the month after.', 'Maria L., bakery owner' ),
        array( 'Clear communication, fair prices and a result our whole team loves.', 'Tom R., operations lead' ),
        array( 'The best support we have had from any agency. Highly recommended.', 'Aisha K., founder' ),
    );

    $columns = '';
    foreach ( $quotes as $quote ) {
        $columns .= '<!-- wp:column --><div class="wp-block-column"><!-- wp:quote --><blockquote class="wp-block-quote"><!-- wp:paragraph --><p>' . esc_html( $quote[0] ) . '</p><!-- /wp:paragraph --><cite>' . esc_html( $quote[1] ) . '</cite></blockquote><!-- /wp:quote --></div><!-- /wp:column -->';
    }

    register_block_pattern( 'wpide/testimonials-three', array(
        'title'         => 'Testimonials: three quotes',
        'description'   => 'Three customer quotes in columns.',
        'categories'    => array( 'wpide-sections' ),
        'keywords'      => array( 'testimonials', 'reviews', 'quotes' ),
        'viewportWidth' => 1200,
        'content'       => '<!-- wp:group {"layout":{"type":"constrained"}} --><div class="wp-block-group"><!-- wp:heading {"textAlign":"center"} --><h2 class="wp-block-heading has-text-align-center">What our clients say</h2><!-- /wp:heading --><!-- wp:columns --><div class="wp-block-columns">' . $columns . '</div><!-- /wp:columns --></div><!-- /wp:group -->',
    ) );
} );
```

## Notes

The columns stack automatically on phones.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Block Pattern: Three Testimonials" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
