-
Notifications
You must be signed in to change notification settings - Fork 0
/
taxonomy-event.php
46 lines (35 loc) · 1.14 KB
/
taxonomy-event.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
/**
* The template for displaying the archives for the taxonomy Event.
* Since all these taxonomies are on videos, we can link to the video post loop here.
*/
get_header(); ?>
<?php get_template_part('parts/page-header-2col'); ?>
<div class="videos clearfix">
<?php
// WP_Query arguments
$args = array(
'post_type' => 'post',
'event' => get_query_var('event'),
'category_name' => 'video',
'order' => 'DESC',
'meta_key' => 'date',
'orderby' => 'meta_value',
'posts_per_page' => 10,
'paged' => get_query_var('paged') ? get_query_var('paged') : 1
);
// The Query
$wp_query = new WP_Query( $args );
if ( $wp_query->have_posts() ) : ?>
<?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
<?php get_template_part('parts/post-loop-video'); ?>
<?php endwhile; ?>
<?php get_template_part('includes/template', 'pager'); //wordpress template pager/pagination ?>
<?php else : ?>
<div class="no-videos">
<?php _e('No videos available', 'uu2014') ?>
</div>
<?php endif; ?>
</div>
<?php get_template_part('parts/page-footer-2col'); ?>
<?php get_footer();