-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtaxonomy-woo_video_category.php
77 lines (56 loc) · 3.01 KB
/
taxonomy-woo_video_category.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php get_header(); ?>
<?php
// Global query variable
global $wp_query, $woo_options;
// Get taxonomy query object
$taxonomy_archive_query_obj = $wp_query->get_queried_object();
// Taxonomy term name
$taxonomy_term_nice_name = $taxonomy_archive_query_obj->name;
// Taxonomy term id
$term_id = $taxonomy_archive_query_obj->term_taxonomy_id;
// Get taxonomy object
$taxonomy_short_name = $taxonomy_archive_query_obj->taxonomy;
$taxonomy_raw_obj = get_taxonomy($taxonomy_short_name);
// You can alternate between these labels: name, singular_name
$taxonomy_full_name = $taxonomy_raw_obj->labels->singular_name;
// Get the permalink for the current page.
$taxonomy_permalink = get_term_link( $taxonomy_archive_query_obj, 'woo_video_category' );
?>
<div id="content-wrap">
<div id="content" class="col-full">
<div class="col-left">
<?php if ( $woo_options[ 'woo_breadcrumbs_show' ] == 'true' ) woo_breadcrumbs(); ?>
<div id="main" class="video-archive">
<?php if (have_posts()) : $count = 0; ?>
<span class="archive_header"><?php //echo __( 'Video Category Archives:', 'woothemes' ); ?> <?php echo $taxonomy_term_nice_name; ?> Channel</span>
<div class="fix"></div>
<?php
// Bar displaying video sorting functionality.
echo woo_sorting_bar( $taxonomy_permalink );
?>
<?php while (have_posts()) : the_post(); $count++; ?>
<!-- Post Starts -->
<div class="post <?php if($count % 3 == 0) { echo "last"; } ?>">
<?php
if ( $woo_options['woo_post_content'] != 'content' ) {
echo '<a href="' . get_permalink( get_the_ID() ) . '" rel="bookmark" title="' . the_title_attribute( array( 'echo' => 0 ) ) . '">' . woo_image_vimeo('width=' . $woo_options['woo_thumb_w'] . '&height=' . $woo_options['woo_thumb_h'] . '&class=thumbnail&link=img&return=true&id=' . get_the_ID() ) . '</a>';
}
?>
<h2 class="title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<span class="date"><?php the_time( get_option( 'date_format' ) ); ?></span>
</div><!-- /.post -->
<?php if($count % 3 == 0) { ?>
<div class="fix"></div>
<?php } ?>
<?php endwhile; else: ?>
<div class="post">
<p><?php _e( 'Sorry, no posts matched your criteria.', 'woothemes' ); ?></p>
</div><!-- /.post -->
<?php endif; ?>
<?php woo_pagenav(); ?>
</div><!-- /#main -->
</div><!-- /.col-left -->
<?php get_sidebar(); ?>
</div><!-- /#content -->
</div><!-- /#content-wrap -->
<?php get_footer(); ?>