Support

Account

Home Forums Front-end Issues showing video on header Reply To: showing video on header

  • maybe in this view is better to read the code. Thank you

    i have created in ACF a Hero field a sub field called oEmbed so i have this structure:

    Hero
    – content
    – oEmbed
    – image
    – other images

    and the code below show only image but i need to insert also a video.

    @if(!empty($hero[‘image’]))
    
    <div class=”banner-image-wrapper”>
    
    @if(!empty($hero[‘other_images’]))
    
    @php
    $element_classes = “swiper-slide px-0″;
    @endphp
    <div class=”swiper-container swiper-container-full-width mb-8”>
    <div class=”swiper-wrapper “>
    <div class=”{!! $element_classes !!}”>
    @pic($hero[‘image’],[‘class’ => ‘ banner-image ‘])
    </div>
    @foreach($hero[‘other_images’] as $k => $v)
    <div class=”{!! $element_classes !!}”>
    @pic($v,[‘class’ => ‘ banner-image ‘])
    </div>
    @endforeach
    
    </div>
    <div class=”swiper-pagination”></div>
    <div class=”swiper-button-prev”></div>
    <div class=”swiper-button-next”></div>
    </div>
    
    @else
    @pic($hero[‘image’],[‘class’ => ‘ banner-image ‘])
    @endif
    </div>
    
    @else
    <div class=”banner-image-wrapper”>
    @pic(get_field(‘default_hero_image’,’options’),[‘class’ => ‘ banner-image ‘])
    </div>
    @endif