I have these two functions:
add_shortcode('section_block_container','dos_section_block_container');
function dos_section_block_container($atts, $content = null) {
$content = do_shortcode($content);
echo '<ul class="list-unstyled list-inline">' . $content . '</ul>';
}
add_shortcode('section_block','dos_section_blocks');
function dos_section_blocks($atts, $content = null) {
// define attributes and their defaults
extract( shortcode_atts( array (
'first' => FALSE,
'color' => '',
'icon' => '',
'title' => '',
), $atts ) );
?>
<li>
<a href="" style="background-color: <?php echo $color; ?>" title="<?php echo $title; ?>" class="section-block show-grid col-12 col-sm-3 <?php // echo ($first == TRUE ? 'col-offset-3 ' : '') ?>col-lg-3">
<h4><?php echo strip_tags ($title); ?></h4>
<?php echo strip_tags($content); ?>
<?php echo $icon; ?>
</a>
</li>
<?php
}
and in the wp editor this with a recursive [section_block]
[section_block_container]
[section_block color="#001e61" title="Lorem Ipsum" icon="" first="true"][/section_block]
[section_block color="#001e61" title="Lorem Ipsum" icon="" first="true"][/section_block]
[/section_block_container]
the problem is the the list does not appear inside the container but outside even with do_shortcode();