ACF Gutenberg Block with Custom Fields

1
2
<?php
/**
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Sample Gutenberg block built with ACF. For this example we are pulling a random testimonial from a Custom Post Type. For that CPT we have two fields a quote_title and author_name. We have to use <?php echo get_field( 'quote_title', get_the_ID() ); ?> to pull from fields within a loop that we are incorporating as a Gutenberg.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.