Advertisement
Guest User

b&n

a guest
Aug 3rd, 2015
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.35 KB | None | 0 0
  1. <?php /* Template Name: Blog Template */ ?>
  2. <?php get_header(); ?>
  3.  
  4. <?php
  5. $gethomePageLayout = get_theme_mod('homepageLayout');
  6. $homepageLayout = $gethomePageLayout !== '' ? $gethomePageLayout : 'no-sidebar';
  7.  
  8. ?>
  9.  
  10. <div class="container pm-containerPadding80">
  11. <div class="row">
  12.  
  13. <?php if($homepageLayout === 'no-sidebar') { ?>
  14.  
  15. <div class="col-lg-12">
  16.  
  17. <?php if (have_posts ()) { while (have_posts ()) { (the_post()); ?>
  18.  
  19. <?php get_template_part( 'content', 'fullpost' ); ?>
  20.  
  21. <?php }//end of posts ?>
  22.  
  23. <?php } else { ?>
  24. <p><?php _e('No posts were found.', 'viennatheme'); ?></p>
  25. <?php } ?>
  26.  
  27. <?php get_template_part( 'content', 'pagination' ); ?>
  28.  
  29. </div>
  30.  
  31. <?php } else if($homepageLayout === 'right-sidebar') {?>
  32.  
  33. <!-- Retrive right sidebar post template -->
  34. <div class="col-lg-8 col-md-8 col-sm-12 pm-main-posts">
  35.  
  36. <?php if (have_posts ()) { while (have_posts ()) { (the_post()); ?>
  37.  
  38. <?php get_template_part( 'content', 'halfpost' ); ?>
  39.  
  40. <?php }//end of posts ?>
  41.  
  42. <?php } else { ?>
  43. <p><?php _e('No posts were found.', 'viennatheme'); ?></p>
  44. <?php } ?>
  45.  
  46. <?php get_template_part( 'content', 'pagination' ); ?>
  47.  
  48. </div>
  49.  
  50. <!-- Right Sidebar -->
  51. <?php get_sidebar('home'); ?>
  52. <!-- /Right Sidebar -->
  53.  
  54. <?php } else if($homepageLayout === 'left-sidebar') { ?>
  55.  
  56. <!-- Left Sidebar -->
  57. <?php get_sidebar('home'); ?>
  58. <!-- /Left Sidebar -->
  59.  
  60. <!-- Retrive right sidebar post template -->
  61. <div class="col-lg-8 col-md-8 col-sm-12 pm-main-posts">
  62.  
  63. <?php if (have_posts ()) { while (have_posts ()) { (the_post()); ?>
  64.  
  65. <?php get_template_part( 'content', 'halfpost' ); ?>
  66.  
  67. <?php }//end of posts ?>
  68.  
  69. <?php } else { ?>
  70. <p><?php _e('No posts were found.', 'viennatheme'); ?></p>
  71. <?php } ?>
  72.  
  73. <?php get_template_part( 'content', 'pagination' ); ?>
  74.  
  75. </div>
  76.  
  77. <?php } else {//default full width layout ?>
  78.  
  79. <div class="col-lg-12 col-md-12 col-sm-12 pm-main-posts">
  80.  
  81. <?php if (have_posts ()) { while (have_posts ()) { (the_post()); ?>
  82.  
  83. <?php get_template_part( 'content', 'fullpost' ); ?>
  84.  
  85. <?php }//end of posts ?>
  86.  
  87. <?php } else { ?>
  88. <p><?php _e('No posts were found.', 'viennatheme'); ?></p>
  89. <?php } ?>
  90.  
  91. <?php get_template_part( 'content', 'pagination' ); ?>
  92.  
  93. </div>
  94.  
  95. <?php } ?>
  96.  
  97. </div> <!-- /row -->
  98. </div> <!-- /container -->
  99. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement