Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $image = get_field( 'image' );
- if ( ! empty( $image ) ) {
- // thumbnail
- $size = 'medium';
- $thumb = $image['sizes'][ $size ];
- } else {
- $thumb = '/wp-content/uploads/2019/01/placeholder.jpg';
- } ?>
- <div class="lozad" data-background-image="<?= $thumb ?>" style="background-repeat: no-repeat; background-position: center; background-size: cover;"></div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement