<div class="featured-boxes-wrap">
<div class="featured-box-area">

    <?php if (get_theme_mod('yumtastic_promo1_title') || get_theme_mod('yumtastic_promo1_image')) : ?>
        <?php if (get_theme_mod('yumtastic_promo1_url')) : ?>
            <a href="<?php echo esc_url(get_theme_mod('yumtastic_promo1_url')); ?>" class="featured-box-link">
                <?php
                $image_url = get_theme_mod('yumtastic_promo1_image') ? get_theme_mod('yumtastic_promo1_image') : get_template_directory_uri() . '/images/slider-default.png';
                echo '<img  loading="lazy" class="featured-box-item" src="' . esc_url($image_url) . '" alt="' . esc_attr(get_theme_mod('yumtastic_promo1_title')) . '" />'; ?>
                <div class="featured-box-overlay">
                    <?php if(get_theme_mod('yumtastic_promo1_title')) : ?>
                        <h4><?php echo esc_html(get_theme_mod('yumtastic_promo1_title')); ?></h4>
                    <?php endif; ?>
                </div>
            </a>
        <?php endif; ?>
    <?php endif; ?>

    <?php if (get_theme_mod('yumtastic_promo2_title') || get_theme_mod('yumtastic_promo2_image')) : ?>
        <?php if (get_theme_mod('yumtastic_promo2_url')) : ?>
            <a href="<?php echo esc_url(get_theme_mod('yumtastic_promo2_url')); ?>" class="featured-box-link">
                <?php
                $image_url = get_theme_mod('yumtastic_promo2_image') ? get_theme_mod('yumtastic_promo2_image') : get_template_directory_uri() . '/images/slider-default.png';
                echo '<img  loading="lazy" class="featured-box-item" src="' . esc_url($image_url) . '" alt="' . esc_attr(get_theme_mod('yumtastic_promo2_title')) . '" />'; ?>
                <div class="featured-box-overlay">
                    <?php if(get_theme_mod('yumtastic_promo2_title')) : ?>
                        <h4><?php echo esc_html(get_theme_mod('yumtastic_promo2_title')); ?></h4>
                    <?php endif; ?>
                </div>
            </a>
        <?php endif; ?>
    <?php endif; ?>

    <?php if (get_theme_mod('yumtastic_promo3_title') || get_theme_mod('yumtastic_promo3_image')) : ?>
        <?php if (get_theme_mod('yumtastic_promo3_url')) : ?>
            <a href="<?php echo esc_url(get_theme_mod('yumtastic_promo3_url')); ?>" class="featured-box-link">
                <?php
                $image_url = get_theme_mod('yumtastic_promo3_image') ? get_theme_mod('yumtastic_promo3_image') : get_template_directory_uri() . '/images/slider-default.png';
                echo '<img  loading="lazy" class="featured-box-item" src="' . esc_url($image_url) . '" alt="' . esc_attr(get_theme_mod('yumtastic_promo3_title')) . '" />'; ?>
                <div class="featured-box-overlay">
                    <?php if(get_theme_mod('yumtastic_promo3_title')) : ?>
                        <h4><?php echo esc_html(get_theme_mod('yumtastic_promo3_title')); ?></h4>
                    <?php endif; ?>
                </div>
            </a>
        <?php endif; ?>
    <?php endif; ?>

    <?php if (get_theme_mod('yumtastic_promo4_title') || get_theme_mod('yumtastic_promo4_image')) : ?>
        <?php if (get_theme_mod('yumtastic_promo4_url')) : ?>
            <a href="<?php echo esc_url(get_theme_mod('yumtastic_promo4_url')); ?>" class="featured-box-link">
                <?php
                $image_url = get_theme_mod('yumtastic_promo4_image') ? get_theme_mod('yumtastic_promo4_image') : get_template_directory_uri() . '/images/slider-default.png';
                echo '<img  loading="lazy" class="featured-box-item" src="' . esc_url($image_url) . '" alt="' . esc_attr(get_theme_mod('yumtastic_promo4_title')) . '" />'; ?>
                <div class="featured-box-overlay">
                    <?php if(get_theme_mod('yumtastic_promo4_title')) : ?>
                        <h4><?php echo esc_html(get_theme_mod('yumtastic_promo4_title')); ?></h4>
                    <?php endif; ?>
                </div>
            </a>
        <?php endif; ?>
    <?php endif; ?>

    <?php if (get_theme_mod('yumtastic_promo5_title') || get_theme_mod('yumtastic_promo5_image')) : ?>
        <?php if (get_theme_mod('yumtastic_promo5_url')) : ?>
            <a href="<?php echo esc_url(get_theme_mod('yumtastic_promo5_url')); ?>" class="featured-box-link">
                <?php
                $image_url = get_theme_mod('yumtastic_promo5_image') ? get_theme_mod('yumtastic_promo5_image') : get_template_directory_uri() . '/images/slider-default.png';
                echo '<img  loading="lazy" class="featured-box-item" src="' . esc_url($image_url) . '" alt="' . esc_attr(get_theme_mod('yumtastic_promo5_title')) . '" />'; ?>
                <div class="featured-box-overlay">
                    <?php if(get_theme_mod('yumtastic_promo5_title')) : ?>
                        <h4><?php echo esc_html(get_theme_mod('yumtastic_promo5_title')); ?></h4>
                    <?php endif; ?>
                </div>
            </a>
        <?php endif; ?>
    <?php endif; ?>

    <?php if (get_theme_mod('yumtastic_promo6_title') || get_theme_mod('yumtastic_promo6_image')) : ?>
        <?php if (get_theme_mod('yumtastic_promo6_url')) : ?>
            <a href="<?php echo esc_url(get_theme_mod('yumtastic_promo6_url')); ?>" class="featured-box-link">
                <?php
                $image_url = get_theme_mod('yumtastic_promo6_image') ? get_theme_mod('yumtastic_promo6_image') : get_template_directory_uri() . '/images/slider-default.png';
                echo '<img  loading="lazy" class="featured-box-item" src="' . esc_url($image_url) . '" alt="' . esc_attr(get_theme_mod('yumtastic_promo6_title')) . '" />'; ?>
                <div class="featured-box-overlay">
                    <?php if(get_theme_mod('yumtastic_promo6_title')) : ?>
                        <h4><?php echo esc_html(get_theme_mod('yumtastic_promo6_title')); ?></h4>
                    <?php endif; ?>
                </div>
            </a>
        <?php endif; ?>
    <?php endif; ?>

    <?php if (get_theme_mod('yumtastic_promo7_title') || get_theme_mod('yumtastic_promo7_image')) : ?>
        <?php if (get_theme_mod('yumtastic_promo7_url')) : ?>
            <a href="<?php echo esc_url(get_theme_mod('yumtastic_promo7_url')); ?>" class="featured-box-link">
                <?php
                $image_url = get_theme_mod('yumtastic_promo7_image') ? get_theme_mod('yumtastic_promo7_image') : get_template_directory_uri() . '/images/slider-default.png';
                echo '<img  loading="lazy" class="featured-box-item" src="' . esc_url($image_url) . '" alt="' . esc_attr(get_theme_mod('yumtastic_promo7_title')) . '" />'; ?>
                <div class="featured-box-overlay">
                    <?php if(get_theme_mod('yumtastic_promo7_title')) : ?>
                        <h4><?php echo esc_html(get_theme_mod('yumtastic_promo7_title')); ?></h4>
                    <?php endif; ?>
                </div>
            </a>
        <?php endif; ?>
    <?php endif; ?>

    <?php if (get_theme_mod('yumtastic_promo8_title') || get_theme_mod('yumtastic_promo8_image')) : ?>
        <?php if (get_theme_mod('yumtastic_promo8_url')) : ?>
            <a href="<?php echo esc_url(get_theme_mod('yumtastic_promo8_url')); ?>" class="featured-box-link">
                <?php
                $image_url = get_theme_mod('yumtastic_promo8_image') ? get_theme_mod('yumtastic_promo8_image') : get_template_directory_uri() . '/images/slider-default.png';
                echo '<img  loading="lazy" class="featured-box-item" src="' . esc_url($image_url) . '" alt="' . esc_attr(get_theme_mod('yumtastic_promo8_title')) . '" />'; ?>
                <div class="featured-box-overlay">
                    <?php if(get_theme_mod('yumtastic_promo8_title')) : ?>
                        <h4><?php echo esc_html(get_theme_mod('yumtastic_promo8_title')); ?></h4>
                    <?php endif; ?>
                </div>
            </a>
        <?php endif; ?>
    <?php endif; ?>


</div>
</div>