-
-
Save billerickson/1928816 to your computer and use it in GitHub Desktop.
taxonomy type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
remove_action('genesis_loop', 'genesis_do_loop'); | |
add_action('genesis_loop', 'do_film_loop'); | |
function do_film_loop(){ | |
$video_file_args = array( | |
'post_type' => 'film', | |
'order_by' => 'title', | |
'order' => 'ASC', | |
'posts_per_page' => '-1', | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'type', | |
'field' => 'slug', | |
'terms' => $term | |
) | |
) | |
); | |
$video_file_query = new WP_Query($video_file_args); | |
?> | |
<div id="video_container"> | |
<?php while($video_file_query->have_posts()) : $video_file_query->the_post(); | |
$i = $i + 1; | |
$video_id = "video_" . $i ?> | |
<video id="<?php echo $video_id;?>" class="video-js vjs-default-skin" width="720" height="405" poster="<?php echo genesis_get_custom_field('_lr_video_poster'); ?>" controls preload="none"> | |
<source src="<?php echo genesis_get_custom_field('_lr_video_file'); ?>" type="video/mp4" /> | |
</video> | |
<?php endwhile; ?> | |
</div> | |
<ul id="thumbs"> | |
<?php | |
$i = $i + 1; | |
$thumb_id = "thumb_" . $i; | |
while($video_file_query->have_posts()) : $video_file_query->the_post(); | |
$i = $i + 1; | |
$thumb_id = "thumb_" . $i; | |
?> | |
<li id="<php echo $thumb_id; ?>"></li> | |
<?php endwhile; ?> | |
</ul> | |
<?php wp_reset_query(); | |
} | |
genesis(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment