chihung
10/10/2019 - 12:50 AM

random smart custom field repeater

<?php

while ( have_posts() ) :
    the_post();

    ?>

    <div class="title-well">

        【<?php echo SCF::get('city_name'); ?>】タクシー会社番号
    </div>

    <?php

    $cf_group = SCF::get( 'taxi-info' );

    shuffle($cf_group);
    foreach ( $cf_group as $field_name => $field_value ) {
        ?>

        <div class="well well-border-gray">
            <a href="tel:<?php echo nl2br($field_value['taxi_tel']); ?>" class="media tel">
                <div class="media-body">
                    <?php echo nl2br($field_value['taxi_name']); ?><br/>
                    TEL.<?php echo nl2br($field_value['taxi_tel']); ?>
                </div>
                <div class="media-right media-middle">
                    <img src="<?php bloginfo('template_directory'); ?>/images/icon/ico-phone.png" alt="" class="media-object"/>
                </div>
            </a>
        </div>


        <?php
    }

    ?>



<?php

endwhile;
?>