%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/pn/beta/64801_wp-content/themes/intosai/templates/sections/
Upload File :
Create Path :
Current File : /var/www/pn/beta/64801_wp-content/themes/intosai/templates/sections/boxes.php

<?php $boxType = get_sub_field('number_of_boxes'); ?>
<?php $iconOrimg = get_sub_field('icons_images'); ?>

<section class="content_section boxes boxlayout_<?php echo $boxType; ?>">
    <div class="wrapper">

        <?php if(get_sub_field('center_title')){ ?>
            <div class="centered_title">
                <h2><?php the_sub_field('title'); ?></h2>
            </div>
        <?php }else{ ?>
            <div class="normal_title">
                <h2><?php the_sub_field('title'); ?></h2>
            </div>
        <?php } ?>

        <?php if(get_sub_field('text')){ ?>
            <div class="text">
                <?php the_sub_field('text'); ?>
            </div>
        <?php } ?>


        <?php if($iconOrimg == 'Icons') : ?>

            <?php if($boxType == '3'){ ?>

                <?php if(have_rows('3_boxes')): $b = 2; ?>
                <?php while(have_rows('3_boxes')): the_row(); ?>

                    <?php if(get_sub_field('link')){ ?>
                        <a href="<?php the_sub_field('link'); ?>">
                    <?php } ?>

                    <div class="box<?php if($b % 3 == 0){ echo ' middle'; } ?>">

                        <?php the_sub_field('icon'); ?>
                        <h3 class="titleFix"><?php the_sub_field('title'); ?></h3>
                        <?php if(get_sub_field('excerpt')){ ?>
                            <div class="excerpt">
                                <?php the_sub_field('excerpt'); ?>...
                            </div>
                        <?php } ?>

                    </div>

                    <?php if(get_sub_field('link')){ ?>
                        </a>
                    <?php } ?>

                <?php $b++; endwhile; endif;?>

            <?php }elseif($boxType == '4'){ ?>

                <?php if(have_rows('4_boxes')): ?>
                <?php while(have_rows('4_boxes')): the_row(); ?>

                    <?php if(get_sub_field('link')){ ?>
                        <a href="<?php the_sub_field('link'); ?>">
                    <?php } ?>

                    <div class="box">

                        <!--i class="fa <?php //the_sub_field('icon'); ?>"></i-->
                        <?php the_sub_field('icon'); ?>
                        <h3 class="titleFix"><?php the_sub_field('title'); ?></h3>
                        <?php if(get_sub_field('excerpt')){ ?>
                            <div class="excerpt">
                                <?php the_sub_field('excerpt'); ?>...
                            </div>
                        <?php } ?>

                    </div>

                    <?php if(get_sub_field('link')){ ?>
                        </a>
                    <?php } ?>

                <?php endwhile; endif;?>

            <?php }elseif($boxType == '5'){ ?>

                <?php if(have_rows('5_boxes')): ?>
                <?php while(have_rows('5_boxes')): the_row(); ?>

                    <?php if(get_sub_field('link')){ ?>
                        <a href="<?php the_sub_field('link'); ?>">
                    <?php } ?>

                    <div class="box">

                        <?php the_sub_field('icon'); ?>
                        <h3 class="titleFix"><?php the_sub_field('title'); ?></h3>
                        <?php if(get_sub_field('excerpt')){ ?>
                            <div class="excerpt">
                                <?php the_sub_field('excerpt'); ?>...
                            </div>
                        <?php } ?>

                    </div>

                    <?php if(get_sub_field('link')){ ?>
                        </a>
                    <?php } ?>

                <?php endwhile; endif;?>

            <?php } ?>

        <?php else :  // IF IT SHOULD DISPLAY IMAGES INSTEAD OF ICONS ?>

            <?php if($boxType == '3'){ ?>

                <?php if(have_rows('3_boxes_images')): $b = 2; ?>
                <?php while(have_rows('3_boxes_images')): the_row(); ?>

                    <?php if(get_sub_field('link')){ ?>
                        <a href="<?php the_sub_field('link'); ?>">
                    <?php } ?>

                    <div class="box<?php if($b % 3 == 0){ echo ' middle'; } ?>">

                        <?php $image = get_sub_field('image'); ?>
                        <img src="<?= $image['sizes']['thumbnail']; ?>" />

                        <h3 class="titleFix"><?php the_sub_field('title'); ?></h3>
                        <?php if(get_sub_field('excerpt')){ ?>
                            <div class="excerpt">
                                <?php the_sub_field('excerpt'); ?>...
                            </div>
                        <?php } ?>

                    </div>

                    <?php if(get_sub_field('link')){ ?>
                        </a>
                    <?php } ?>

                <?php $b++; endwhile; endif;?>

            <?php }elseif($boxType == '4'){ ?>

                <?php if(have_rows('4_boxes_images')): ?>
                <?php while(have_rows('4_boxes_images')): the_row(); ?>

                    <?php if(get_sub_field('link')){ ?>
                        <a href="<?php the_sub_field('link'); ?>">
                    <?php } ?>

                    <div class="box">

                        <?php $image = get_sub_field('image'); ?>
                        <img src="<?= $image['sizes']['thumbnail']; ?>" />

                        <h3 class="titleFix"><?php the_sub_field('title'); ?></h3>
                        <?php if(get_sub_field('excerpt')){ ?>
                            <div class="excerpt">
                                <?php the_sub_field('excerpt'); ?>...
                            </div>
                        <?php } ?>

                    </div>

                    <?php if(get_sub_field('link')){ ?>
                        </a>
                    <?php } ?>

                <?php endwhile; endif;?>

            <?php }elseif($boxType == '5'){ ?>

                <?php if(have_rows('5_boxes_images')): ?>
                <?php while(have_rows('5_boxes_images')): the_row(); ?>

                    <?php if(get_sub_field('link')){ ?>
                        <a href="<?php the_sub_field('link'); ?>">
                    <?php } ?>

                    <div class="box">

                        <?php $image = get_sub_field('image'); ?>
                        <img src="<?= $image['sizes']['thumbnail']; ?>" />

                        <h3 class="titleFix"><?php the_sub_field('title'); ?></h3>
                        <?php if(get_sub_field('excerpt')){ ?>
                            <div class="excerpt">
                                <?php the_sub_field('excerpt'); ?>...
                            </div>
                        <?php } ?>

                    </div>

                    <?php if(get_sub_field('link')){ ?>
                        </a>
                    <?php } ?>

                <?php endwhile; endif;?>

            <?php } ?>

        <?php endif; ?>

        <?php if(get_sub_field('button_target')){ ?>
            <div class="center_btn">
                <a class="btn trans-bg blue blue-border blue-hover-o center" href="<?php the_sub_field('button_target'); ?>">
                    <?php the_sub_field('button_text'); ?> <i class="fa fa-long-arrow-right"></i>
                </a>
            </div>
        <?php } ?>

    </div>
</section>

Zerion Mini Shell 1.0