
<?php if (is_array(get_field('titles')) && count(get_field('titles')) > 0): ?>
    <?php list($heading, $separator) = $rdgb->helpers->get_heading(get_fields(), 'separator'); ?>

        <div class="heading-container" style="<?php echo $separator; ?>">
            <div class="center">
                <span class="border"></span>
                <div class="heading">
                    <<?php echo $heading; ?>>
                    <?php foreach(get_field('titles') as $titles): ?>
                        <?php list($title, $title_style) = $rdgb->helpers->get_heading($titles, 'title'); ?>
                        <span style="<?php echo $title_style; ?>"><?php echo $title; ?></span>
                    <?php endforeach; ?>
                    </<?php echo $heading; ?>>
                </div>
            </div>
        </div>
<?php else: ?>
    <?php if (get_field('title') == 'show'): ?>
        <div class="message">
            <span><?php echo __('Must add some text.'); ?></span>
        </div>
    <?php endif; ?>
<?php endif; ?>
