Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 82 lines (48 sloc) 2.811 kb
217f7fd Importing the News theme files and folders.
greenshady authored
1 <?php
2 /**
3 * Video Sidebar Template
4 *
5 * The Video sidebar first checks for an active sidebar of 'utility-video'. If this sidebar isn't active, it
6 * displays a tabbed recent/popular list of videos. The 'utility-video' sidebar isn't registered by default.
7 * If you want to use it, you must register a sidebar with that specific ID.
8 *
9 * @package News
10 * @subpackage Template
11 */
12
13 if ( is_active_sidebar( 'video' ) ) : ?>
14
15 <div id="sidebar-video" class="sidebar utility">
16
17 <?php dynamic_sidebar( 'video' ); ?>
18
19 </div><!-- #sidebar-video .utility -->
20
21 <?php else : ?>
22
23 <div id="sidebar-video" class="sidebar utility">
24
25 <div class="ui-tabs">
26
27 <div class="ui-tabs-wrap">
28
29 <ul class="ui-tabs-nav">
b67e8bf Justin Tadlock Change all instances of hybrid_get_textdomain() to 'news'.
authored
30 <li><a href="#video-tabs-1"><?php _e( 'Recent', 'news' ); ?></a></li>
31 <li><a href="#video-tabs-2"><?php _e( 'Popular', 'news' ); ?></a></li>
217f7fd Importing the News theme files and folders.
greenshady authored
32 </ul><!-- .ui-tabs-nav -->
33
34 <div id="video-tabs-1" class="ui-tabs-panel">
35
36 <?php $loop = new WP_Query( array( 'post_type' => apply_filters( 'news_video_post_type', 'video' ), 'posts_per_page' => 3 ) ); ?>
37
38 <?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
39
40 <div class="<?php hybrid_entry_class(); ?>">
41
42 <?php get_the_image( array( 'meta_key' => array( 'Thumbnail' ), 'size' => 'news-thumbnail' ) ); ?>
43
44 <?php echo apply_atomic_shortcode( 'entry_title', the_title( '<h4 class="entry-title"><a href="' . get_permalink() . '" title="' . the_title_attribute( 'echo=0' ) . '" rel="bookmark">', '</a></h4>', false ) ); ?>
45
46 <?php echo apply_atomic_shortcode( 'byline', '<div class="byline">[entry-published]</div>' ); ?>
47
48 </div><!-- .hentry -->
49
50 <?php endwhile; ?>
51
52 </div><!-- .ui-tabs-panel -->
53
54 <div id="video-tabs-2" class="ui-tabs-panel">
55
56 <?php $loop = new WP_Query( array( 'post_type' => apply_filters( 'news_video_post_type', 'video' ), 'orderby' => 'comment_count', 'posts_per_page' => 3 ) ); ?>
57
58 <?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
59
60 <div class="<?php hybrid_entry_class(); ?>">
61
62 <?php get_the_image( array( 'meta_key' => array( 'Thumbnail' ), 'size' => 'news-thumbnail' ) ); ?>
63
64 <?php echo apply_atomic_shortcode( 'entry_title', the_title( '<h4 class="entry-title"><a href="' . get_permalink() . '" title="' . the_title_attribute( 'echo=0' ) . '" rel="bookmark">', '</a></h4>', false ) ); ?>
65
66 <?php echo apply_atomic_shortcode( 'byline', '<div class="byline">[entry-published]</div>' ); ?>
67
68 </div><!-- .hentry -->
69
70 <?php endwhile; ?>
71
72 </div><!-- .ui-tabs-panel -->
73
74 </div><!-- .ui-tabs-wrap -->
75
76 </div><!-- .ui-tabs -->
77
78 <?php wp_reset_query(); ?>
79
80 </div><!-- #sidebar-video .utility -->
81
82 <?php endif; ?>
Something went wrong with that request. Please try again.