<article class="video-full-layout full-width"> <?php $video_ogv = get_sub_field('video_ogv'); $video_mp4 = get_sub_field('video_mp4'); $img_id = get_sub_field('poster_image'); $img_size = "full"; $headline = get_sub_field('headline'); $html = get_sub_field('html'); $poster = ap_better_thunbnails($img_id, $img_size); if ($video_ogv) { ?> <div class="video-wrapper"> <video class="media-video" autoplay loop muted preload poster="<?php echo $poster[0]; ?> " style="background-image:url('<?php echo $poster[0]; ?> ');"> <source src="<?php echo $video_mp4; ?> " type='video/mp4;' /> <source src="<?php echo $video_ogv; ?> " type='video/ogg;' /> <div class="vide-fallback" style="background-image:url('<?php echo $poster[0]; ?> ');"></div>
<?php if (have_posts()) { ?> <?php while (have_posts()) { the_post(); ?> <article <?php post_class("clearfix"); ?> > <?php $post_id = get_the_ID(); $img_size = 'post-thumbnail'; $thumb = ap_better_thunbnails($post_id, $img_size); ?> <h1><a href="<?php the_permalink(); ?> "><?php the_title(); ?> </a></h1> <img src="<?php echo $thumb[0]; ?> "> <div class="home"><?php the_content(); ?>