Last active
October 22, 2018 17:46
-
-
Save nicooprat/9e435ed33d9fa5a7af1cf0febc583b97 to your computer and use it in GitHub Desktop.
Custom Gutenberg bloc with bare PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Title: Témoignage | |
Description: test | |
Category: formatting | |
Icon: admin-comments | |
Keywords: testimonial quote | |
*/ | |
?> | |
<blockquote data-<?php echo $block['id'] ?>> | |
<p><?php the_field('testimonial') ?></p> | |
<cite> | |
<img src="<?php echo get_field('picture')['url'] ?>" alt="<?php echo get_field('picture')['alt'] ?>" /> | |
<span><?php the_field('author') ?></span> | |
</cite> | |
</blockquote> | |
<style type="text/css"> | |
[data-<?php echo $block['id'] ?>] { | |
background: {{get_field('color')}}; | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment