Skip to content

Instantly share code, notes, and snippets.

@ndiego
Last active May 19, 2023 15:24
Show Gist options
  • Save ndiego/541e7566eb76175723cd7277091d589b to your computer and use it in GitHub Desktop.
Save ndiego/541e7566eb76175723cd7277091d589b to your computer and use it in GitHub Desktop.
Testimonial Block Pattern with Locked Blocks
<?php
/**
* Title: Testimonials
* Slug: twentytwentytwo/testimonials
* Categories: columns
* Block Types: core/post-content
* Post Types: page
*/
?>
<!-- wp:group {"align":"wide","style":{"spacing":{"blockGap":"2rem"}},"layout":{"inherit":false}} -->
<div class="wp-block-group alignwide"><!-- wp:heading {"textAlign":"center","style":{"typography":{"fontStyle":"normal","fontWeight":"500"}},"fontSize":"x-large"} -->
<h2 class="has-text-align-center has-x-large-font-size" style="font-style:normal;font-weight:500"><?php echo esc_html( 'What Our Customers Are Saying', 'twentytwentytwo' ); ?></h2>
<!-- /wp:heading -->
<!-- wp:columns {"lock":{"move":false,"remove":false},"align":"wide","style":{"spacing":{"blockGap":"2rem","margin":{"top":"3rem"}}}} -->
<div class="wp-block-columns alignwide" style="margin-top:3rem"><!-- wp:column {"lock":{"move":false,"remove":true},"style":{"spacing":{"padding":{"top":"2rem","right":"1.5rem","bottom":"2rem","left":"1rem"}}},"backgroundColor":"tertiary","className":"box-shadow\u002d\u002ddefault"} -->
<div class="wp-block-column box-shadow--default has-tertiary-background-color has-background" style="padding-top:2rem;padding-right:1.5rem;padding-bottom:2rem;padding-left:1rem"><!-- wp:quote {"lock":{"move":true,"remove":true},"className":"is-style-plain","fontSize":"small"} -->
<blockquote class="wp-block-quote is-style-plain has-small-font-size"><p><?php echo esc_html( 'Testimonial — Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus in tempus urna, at lacinia lectus. Cras aliquam neque et orci laoreet, eget lobortis sem tincidunt.', 'twentytwentytwo' ); ?></p></blockquote>
<!-- /wp:quote -->
<!-- wp:group {"lock":{"move":true,"remove":true},"style":{"spacing":{"blockGap":"1rem","padding":{"right":"1rem","left":"1rem"}}},"layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"left"}} -->
<div class="wp-block-group" style="padding-right:1rem;padding-left:1rem"><!-- wp:image {"lock":{"move":true,"remove":true},"width":60,"height":60,"style":{"border":{"radius":"100px"},"color":{"duotone":["#000097","#ff4747"]}},"className":"size-full is-resized is-style-default"} -->
<figure class="wp-block-image is-resized size-full is-style-default" style="border-radius:100px"><img src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/icon-bird.jpg" alt="" width="60" height="60"/></figure>
<!-- /wp:image -->
<!-- wp:group {"lock":{"move":true,"remove":true},"style":{"spacing":{"blockGap":"4px","margin":{"bottom":"1rem"}}}} -->
<div class="wp-block-group" style="margin-bottom:1rem"><!-- wp:paragraph {"placeholder":"First \u0026 Last Name","lock":{"move":true,"remove":true},"style":{"typography":{"fontStyle":"normal","fontWeight":"600","lineHeight":"1.5"}},"fontSize":"small"} -->
<p class="has-small-font-size" style="font-style:normal;font-weight:600;line-height:1.5"><?php echo esc_html( 'First & Last Name', 'twentytwentytwo' ); ?></p>
<!-- /wp:paragraph -->
<!-- wp:paragraph {"lock":{"move":true,"remove":true},"style":{"typography":{"textTransform":"uppercase","fontSize":"0.75rem"},"color":{"text":"#666666"}}} -->
<p class="has-text-color" style="color:#666666;font-size:0.75rem;text-transform:uppercase"><?php echo esc_html( 'Testimonial Source', 'twentytwentytwo' ); ?></p>
<!-- /wp:paragraph --></div>
<!-- /wp:group --></div>
<!-- /wp:group --></div>
<!-- /wp:column -->
<!-- wp:column {"lock":{"move":false,"remove":true},"style":{"spacing":{"padding":{"top":"2rem","right":"1.5rem","bottom":"2rem","left":"1rem"}}},"backgroundColor":"tertiary","className":"box-shadow\u002d\u002ddefault"} -->
<div class="wp-block-column box-shadow--default has-tertiary-background-color has-background" style="padding-top:2rem;padding-right:1.5rem;padding-bottom:2rem;padding-left:1rem"><!-- wp:quote {"lock":{"move":true,"remove":true},"className":"is-style-plain","fontSize":"small"} -->
<blockquote class="wp-block-quote is-style-plain has-small-font-size"><p><?php echo esc_html( 'Testimonial — Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus in tempus urna, at lacinia lectus. Cras aliquam neque et orci laoreet, eget lobortis sem tincidunt.', 'twentytwentytwo' ); ?></p></blockquote>
<!-- /wp:quote -->
<!-- wp:group {"lock":{"move":true,"remove":true},"style":{"spacing":{"blockGap":"1rem","padding":{"right":"1rem","left":"1rem"}}},"layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"left"}} -->
<div class="wp-block-group" style="padding-right:1rem;padding-left:1rem"><!-- wp:image {"lock":{"move":true,"remove":true},"width":60,"height":60,"style":{"border":{"radius":"100px"},"color":{"duotone":["#a60072","#67ff66"]}},"className":"size-full is-resized is-style-default"} -->
<figure class="wp-block-image is-resized size-full is-style-default" style="border-radius:100px"><img src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/icon-bird.jpg" alt="" width="60" height="60"/></figure>
<!-- /wp:image -->
<!-- wp:group {"lock":{"move":true,"remove":true},"style":{"spacing":{"blockGap":"4px","margin":{"bottom":"1rem"}}}} -->
<div class="wp-block-group" style="margin-bottom:1rem"><!-- wp:paragraph {"placeholder":"First \u0026 Last Name","lock":{"move":true,"remove":true},"style":{"typography":{"fontStyle":"normal","fontWeight":"600","lineHeight":"1.5"}},"fontSize":"small"} -->
<p class="has-small-font-size" style="font-style:normal;font-weight:600;line-height:1.5"><?php echo esc_html( 'First & Last Name', 'twentytwentytwo' ); ?></p>
<!-- /wp:paragraph -->
<!-- wp:paragraph {"lock":{"move":true,"remove":true},"style":{"typography":{"textTransform":"uppercase","fontSize":"0.75rem"},"color":{"text":"#666666"}}} -->
<p class="has-text-color" style="color:#666666;font-size:0.75rem;text-transform:uppercase"><?php echo esc_html( 'Testimonial Source', 'twentytwentytwo' ); ?></p>
<!-- /wp:paragraph --></div>
<!-- /wp:group --></div>
<!-- /wp:group --></div>
<!-- /wp:column -->
<!-- wp:column {"lock":{"move":false,"remove":true},"style":{"spacing":{"padding":{"top":"2rem","right":"1.5rem","bottom":"2rem","left":"1rem"}}},"backgroundColor":"tertiary","className":"box-shadow\u002d\u002ddefault"} -->
<div class="wp-block-column box-shadow--default has-tertiary-background-color has-background" style="padding-top:2rem;padding-right:1.5rem;padding-bottom:2rem;padding-left:1rem"><!-- wp:quote {"lock":{"move":true,"remove":true},"className":"is-style-plain","fontSize":"small"} -->
<blockquote class="wp-block-quote is-style-plain has-small-font-size"><p><?php echo esc_html( 'Testimonial — Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus in tempus urna, at lacinia lectus. Cras aliquam neque et orci laoreet, eget lobortis sem tincidunt.', 'twentytwentytwo' ); ?></p></blockquote>
<!-- /wp:quote -->
<!-- wp:group {"lock":{"move":true,"remove":true},"style":{"spacing":{"blockGap":"1rem","padding":{"right":"1rem","left":"1rem"}}},"layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"left"}} -->
<div class="wp-block-group" style="padding-right:1rem;padding-left:1rem"><!-- wp:image {"lock":{"move":true,"remove":true},"width":60,"height":60,"style":{"border":{"radius":"100px"},"color":{"duotone":["#c7005a","#fff278"]}},"className":"size-full is-resized is-style-default"} -->
<figure class="wp-block-image is-resized size-full is-style-default" style="border-radius:100px"><img src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/icon-bird.jpg" alt="" width="60" height="60"/></figure>
<!-- /wp:image -->
<!-- wp:group {"lock":{"move":true,"remove":true},"style":{"spacing":{"blockGap":"4px","margin":{"bottom":"1rem"}}}} -->
<div class="wp-block-group" style="margin-bottom:1rem"><!-- wp:paragraph {"placeholder":"First \u0026 Last Name","lock":{"move":true,"remove":true},"style":{"typography":{"fontStyle":"normal","fontWeight":"600","lineHeight":"1.5"}},"fontSize":"small"} -->
<p class="has-small-font-size" style="font-style:normal;font-weight:600;line-height:1.5"><?php echo esc_html( 'First & Last Name', 'twentytwentytwo' ); ?></p>
<!-- /wp:paragraph -->
<!-- wp:paragraph {"lock":{"move":true,"remove":true},"style":{"typography":{"textTransform":"uppercase","fontSize":"0.75rem"},"color":{"text":"#666666"}}} -->
<p class="has-text-color" style="color:#666666;font-size:0.75rem;text-transform:uppercase"><?php echo esc_html( 'Testimonial Source', 'twentytwentytwo' ); ?></p>
<!-- /wp:paragraph --></div>
<!-- /wp:group --></div>
<!-- /wp:group --></div>
<!-- /wp:column --></div>
<!-- /wp:columns --></div>
<!-- /wp:group -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment