Advertisement
Guest User

video list

a guest
Jun 5th, 2015
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.61 KB | None | 0 0
  1. <?php
  2. /*
  3. * Template Name: Video listing
  4. */
  5. get_header();
  6. $default_style = ot_get_option('default_listing_layout');
  7. if($default_style =='style-list-1'){?>
  8. <style>
  9. .tooltipster-base{ display:none !important}
  10. </style>
  11. <?php }
  12. $layout = ot_get_option('blog_layout','right');
  13. global $sidebar_width;
  14. $style = 'video';
  15. ?>
  16. <div id="body">
  17. <div class="container">
  18. <div class="row">
  19. <?php $pagination = ot_get_option('pagination_style','page_def');?>
  20. <div id="content" class="<?php echo $layout!='full'?($sidebar_width?'col-md-9':'col-md-8'):'col-md-12' ?><?php echo ($layout == 'left') ? " revert-layout":"";?>" role="main">
  21. <?php
  22. $paged = get_query_var('paged')?get_query_var('paged'):(get_query_var('page')?get_query_var('page'):1);
  23. $args=array(
  24. 'post_type' => 'post',
  25. 'post_status' => 'publish',
  26. 'paged' => $paged,
  27. 'tax_query' => array(
  28. array(
  29. 'taxonomy' => 'post_format',
  30. 'field' => 'slug',
  31. 'terms' => array(
  32. 'post-format-video'
  33. ),
  34. 'operator' => 'IN'
  35. )
  36. )
  37. );
  38. $listing_query = null;
  39. $listing_query = new WP_Query($args);
  40. if ($listing_query->have_posts()) : ?>
  41. <section class="video-listing <?php echo ot_get_option('default_listing_layout')?ot_get_option('default_listing_layout'):''; ?>">
  42. <div class="video-listing-head">
  43. <?php $show_hide_title = ot_get_option('show_hide_title','1');
  44. if($show_hide_title=='1'){ ?>
  45. <h2 class="light-title"><?php global $post; echo $post->post_title ?></h2>
  46. <?php } ?>
  47. <?php get_template_part('loop-filter'); ?>
  48. </div>
  49. <div class="video-listing-content <?php if($pagination=='page_ajax'||$pagination==''){ echo 'tm_load_ajax';} ?> ">
  50. <?php get_template_part('loop-item'); ?>
  51. </div><!--/video-listing-content-->
  52. <div class="clearfix"></div>
  53. <?php if($pagination=='page_navi'){
  54. wp_pagenavi(array( 'query' => $listing_query ));
  55. }else if($pagination=='page_def'){
  56. cactusthemes_content_nav('paging');
  57. }?>
  58. </section>
  59. <?php endif; wp_reset_postdata(); ?>
  60. </div><!--#content-->
  61. <?php if($layout != 'full'){ get_sidebar(); } ?>
  62. </div><!--/row-->
  63. </div><!--/container-->
  64. </div><!--/body-->
  65. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement