Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.08 KB | None | 0 0
  1. <?php
  2. /**
  3. * The Template for displaying all single posts.
  4. *
  5. * @package VW Travel
  6. */
  7.  
  8. get_header(); ?>
  9.  
  10. <div class="container">
  11. <div class="middle-align">
  12. <?php
  13. $theme_lay = get_theme_mod( 'vw_travel_theme_options','Right Sidebar');
  14. if($theme_lay == 'Left Sidebar'){ ?>
  15. <div class="row">
  16. <div class="col-lg-4 col-md-4" id="sidebar"><?php dynamic_sidebar('sidebar-1');?></div>
  17. <div id="our-services" class="services col-lg-8 col-md-8">
  18.  
  19. <?php if ( have_posts() ) :
  20. /* Start the Loop */
  21.  
  22. while ( have_posts() ) : the_post();
  23.  
  24. get_template_part( 'template-parts/single-post-layout' );
  25.  
  26. endwhile;
  27.  
  28. else :
  29.  
  30. get_template_part( 'no-results' );
  31.  
  32. endif;
  33. ?>
  34. <div class="navigation">
  35. <?php
  36. // Previous/next page navigation.
  37. the_posts_pagination( array(
  38. 'prev_text' => __( 'Previous page', 'vw-travel' ),
  39. 'next_text' => __( 'Next page', 'vw-travel' ),
  40. 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'vw-travel' ) . ' </span>',
  41. ) );
  42. ?>
  43. <div class="clearfix"></div>
  44. </div>
  45. </div>
  46. </div>
  47. <div class="clearfix"></div>
  48. <?php }else if($theme_lay == 'Right Sidebar'){ ?>
  49. <div class="row">
  50. <div id="our-services" class="services col-lg-8 col-md-8">
  51.  
  52. <?php if ( have_posts() ) :
  53. /* Start the Loop */
  54.  
  55. while ( have_posts() ) : the_post();
  56.  
  57. get_template_part( 'template-parts/single-post-layout' );
  58.  
  59. endwhile;
  60.  
  61. else :
  62.  
  63. get_template_part( 'no-results' );
  64.  
  65. endif;
  66. ?>
  67. <div class="navigation">
  68. <?php
  69. // Previous/next page navigation.
  70. the_posts_pagination( array(
  71. 'prev_text' => __( 'Previous page', 'vw-travel' ),
  72. 'next_text' => __( 'Next page', 'vw-travel' ),
  73. 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'vw-travel' ) . ' </span>',
  74. ) );
  75. ?>
  76. <div class="clearfix"></div>
  77. </div>
  78. </div>
  79. <div class="col-lg-4 col-md-4" id="sidebar"><?php dynamic_sidebar('sidebar-1');?></div>
  80. </div>
  81. <?php }else if($theme_lay == 'One Column'){ ?>
  82. <div id="our-services" class="services">
  83.  
  84. <?php if ( have_posts() ) :
  85. /* Start the Loop */
  86.  
  87. while ( have_posts() ) : the_post();
  88.  
  89. get_template_part( 'template-parts/single-post-layout' );
  90.  
  91. endwhile;
  92.  
  93. else :
  94.  
  95. get_template_part( 'no-results' );
  96.  
  97. endif;
  98. ?>
  99. <div class="navigation">
  100. <?php
  101. // Previous/next page navigation.
  102. the_posts_pagination( array(
  103. 'prev_text' => __( 'Previous page', 'vw-travel' ),
  104. 'next_text' => __( 'Next page', 'vw-travel' ),
  105. 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'vw-travel' ) . ' </span>',
  106. ) );
  107. ?>
  108. <div class="clearfix"></div>
  109. </div>
  110. </div>
  111. <?php }else if($theme_lay == 'Three Columns'){ ?>
  112. <div class="row">
  113. <div class="col-lg-3 col-md-3" id="sidebar"><?php dynamic_sidebar('sidebar-1');?></div>
  114. <div id="our-services" class="services col-lg-6 col-md-6">
  115.  
  116. <?php if ( have_posts() ) :
  117. /* Start the Loop */
  118.  
  119. while ( have_posts() ) : the_post();
  120.  
  121. get_template_part( 'template-parts/single-post-layout' );
  122.  
  123. endwhile;
  124.  
  125. else :
  126.  
  127. get_template_part( 'no-results' );
  128.  
  129. endif;
  130. ?>
  131. <div class="navigation">
  132. <?php
  133. // Previous/next page navigation.
  134. the_posts_pagination( array(
  135. 'prev_text' => __( 'Previous page', 'vw-travel' ),
  136. 'next_text' => __( 'Next page', 'vw-travel' ),
  137. 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'vw-travel' ) . ' </span>',
  138. ) );
  139. ?>
  140. <div class="clearfix"></div>
  141. </div>
  142. </div>
  143. <div class="col-lg-3 col-md-3" id="sidebar"><?php dynamic_sidebar('sidebar-2');?></div>
  144. </div>
  145. <?php }else if($theme_lay == 'Four Columns'){ ?>
  146. <div class="row">
  147. <div class="col-lg-3 col-md-3" id="sidebar"><?php dynamic_sidebar('sidebar-1');?></div>
  148. <div id="our-services" class="services col-lg-3 col-md-3">
  149.  
  150. <?php if ( have_posts() ) :
  151. /* Start the Loop */
  152.  
  153. while ( have_posts() ) : the_post();
  154.  
  155. get_template_part( 'template-parts/single-post-layout' );
  156.  
  157. endwhile;
  158.  
  159. else :
  160.  
  161. get_template_part( 'no-results' );
  162.  
  163. endif;
  164. ?>
  165. <div class="navigation">
  166. <?php
  167. // Previous/next page navigation.
  168. the_posts_pagination( array(
  169. 'prev_text' => __( 'Previous page', 'vw-travel' ),
  170. 'next_text' => __( 'Next page', 'vw-travel' ),
  171. 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'vw-travel' ) . ' </span>',
  172. ) );
  173. ?>
  174. <div class="clearfix"></div>
  175. </div>
  176. </div>
  177. <div class="col-lg-3 col-md-3" id="sidebar"><?php dynamic_sidebar('sidebar-2');?></div>
  178. <div class="col-lg-3 col-md-3" id="sidebar"><?php dynamic_sidebar('sidebar-3');?></div>
  179. </div>
  180. <?php }else if($theme_lay == 'Grid Layout'){ ?>
  181. <div class="row">
  182. <div id="our-services" class="services col-lg-9 col-md-9">
  183. <div class="row">
  184. <?php if ( have_posts() ) :
  185. /* Start the Loop */
  186.  
  187. while ( have_posts() ) : the_post();
  188.  
  189. get_template_part( 'template-parts/single-post-layout' );
  190.  
  191. endwhile;
  192.  
  193. else :
  194.  
  195. get_template_part( 'no-results' );
  196.  
  197. endif;
  198. ?>
  199. </div>
  200. <div class="navigation">
  201. <?php
  202. // Previous/next page navigation.
  203. the_posts_pagination( array(
  204. 'prev_text' => __( 'Previous page', 'vw-travel' ),
  205. 'next_text' => __( 'Next page', 'vw-travel' ),
  206. 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'vw-travel' ) . ' </span>',
  207. ) );
  208. ?>
  209. <div class="clearfix"></div>
  210. </div>
  211. </div>
  212. <div class="col-lg-3 col-md-3" id="sidebar"><?php dynamic_sidebar('sidebar-1');?></div>
  213. </div>
  214. <?php }else{ ?>
  215. <div class="row">
  216. <div id="our-services" class="services col-lg-8 col-md-8">
  217. <?php if ( have_posts() ) :
  218. /* Start the Loop */
  219.  
  220. while ( have_posts() ) : the_post();
  221.  
  222. get_template_part( 'template-parts/single-post-layout');
  223.  
  224. endwhile;
  225.  
  226. else :
  227.  
  228. get_template_part( 'no-results' );
  229.  
  230. endif;
  231. ?>
  232. <div class="navigation">
  233. <?php
  234. // Previous/next page navigation.
  235. the_posts_pagination( array(
  236. 'prev_text' => __( 'Previous page', 'vw-travel' ),
  237. 'next_text' => __( 'Next page', 'vw-travel' ),
  238. 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'vw-travel' ) . ' </span>',
  239. ) );
  240. ?>
  241. <div class="clearfix"></div>
  242. </div>
  243. </div>
  244. <div class="col-lg-4 col-md-4" id="sidebar"><?php dynamic_sidebar('sidebar-1');?></div>
  245. </div>
  246. <?php } ?>
  247. <div class="clearfix"></div>
  248. </div>
  249. </div>
  250.  
  251. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement