Skip to content

Instantly share code, notes, and snippets.

@tessak22
Created October 5, 2018 17:42
Show Gist options
  • Save tessak22/9e425905ae69ebc233295d26402b69e4 to your computer and use it in GitHub Desktop.
Save tessak22/9e425905ae69ebc233295d26402b69e4 to your computer and use it in GitHub Desktop.
ACF Page Builder - Blocks - Centered Paragraph with Title (Create a "blocks" directory in your theme directory and place in there)
<?php
$title = get_sub_field('title');
$content = get_sub_field('content');
?>
<section class="content-block centered_paragraph_with_title flex">
<div class="content col-sm-10 col-sm-offset-1 text-center">
<?php if ( $title ): ?>
<h3><?php echo $title; ?></h3>
<?php endif; ?>
<?php echo $content; ?>
</div>
</section>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment