1. <?php
  2. /**
  3. * The default template for displaying content
  4. * Used for single posts.
  5. */
  6. ?>
  7. <?php $grid = ot_get_option( 'grid_option', 'col-sm-' ); ?>
  8. <a name="top"></a>
  9. <div class="container maddos-content-single">
  10. <div class="row">
  11. <div class="<?php echo esc_html( $grid );?>12">
  12. <div id="post-<?php the_ID();?>" <?php post_class( 'maddos-link-container' );?>>
  13. <div class="row">
  14. <div class="<?php echo esc_html( $grid );?>12">
  15. <div class="maddos-link-header nocenter">
  16. <h1 class="maddos-post-header"><?php echo $site_icon; ?><?php echo ot_get_option( 'post_header_prefix' );?> <?php the_title();?></h1>
  17. <div class="maddos-link-header-back">
  18. <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><span class="glyphicon glyphicon-arrow-left" aria-hidden="true"></span> Back To Home</a>
  19. </div>
  20. </div>
  21. </div>
  22. </div>
  23. <div class="row">
  24. <div class="<?php echo esc_html( $grid );?>12">
  25. <div class="maddos-link-content">
  26. <?php // if ( function_exists( 'echo_crp' ) ) { echo_crp(); } ?>
  27. <?
  28. $paged = ( get_query_var('page') ) ? get_query_var('page') : 1;
  29. $query_args = array(
  30. 'post_type' => 'vrvideo',
  31. 'posts_per_page' => 12,
  32. 'paged' => get_query_var( 'paged' )
  33. );
  34. $loop = new WP_Query( $query_args );
  35. echo '<div class="crp_related"><ul>';
  36. while ($loop->have_posts()) {
  37. $loop->the_post();
  38. echo '
  39. <li>
  40. <a href="', the_permalink(), '">
  41. ', the_post_thumbnail('related-thumb2'), '
  42. </a>
  43. <span class="crp_title" style="bottom:4px;">', (
  44. strlen($title= the_title('', '', false)) > 48 ?
  45. substr($title, 0, 48) :
  46. $title
  47. ), '</span>
  48. </li>';
  49. }
  50. echo '</ul>';
  51. echo '<div class="crp_clear"></div></div>';
  52. ?>
  53. <?php
  54. next_posts_link( 'Older Entries', $loop->max_num_pages );
  55. previous_posts_link( ' - Newer Entries' );
  56. ?>
  57. <?php wp_reset_postdata(); ?>
  58. </div> <!-- end maddos-link-content -->
  59. </div>
  60. </div>
  61. <div class="row">
  62. <div class="<?php echo esc_html( $grid );?>12">
  63. <div class="maddos-comments-container">
  64. <?php comments_template( '', true ); ?>
  65. </div>
  66. </div>
  67. </div>
  68. </div><!-- end maddos-link-container -->
  69. </div>
  70. </div>
  71. </div>
Comments powered by Disqus