Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $headerImageDesktop = get_field('header_image_desktop', 'option');
- $headerImageTablet = get_field('header_image_tablet', 'option');
- $headerImageMobile = get_field('header_image_mobile', 'option');
- if ( $headerImageDesktop && $headerImageTablet && $headerImageMobile ): ?>
- <div class="headerConatiner">
- <div class="headerImage">
- <!-- <img id="foo"
- src="<?php //echo $headerImageDesktop['url']; ?>"
- srcset="<?php //echo $headerImageDesktop['url']; ?> 1024w, <?php //echo $headerImageTablet['url']; ?> 960w, <?php //echo $headerImageMobile['url']; ?> 638w"
- sizes="100vw"
- alt="" > -->
- <picture>
- <!--[if IE 9]><video style="display: none;"><![endif]-->
- <source srcset="<?php echo $headerImageDesktop['url']; ?>" media="(min-width: 960px)">
- <source srcset="<?php echo $headerImageTablet['url']; ?>" media="(min-width: 638px)">
- <img id="foo" srcset="<?php echo $headerImageMobile['url']; ?>" alt="">
- <!--[if IE 9]></video><![endif]-->
- </picture>
- </div>
- </div>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement