Guest User

dsga

a guest
Sep 28th, 2016
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.37 KB | None | 0 0
  1. <?php
  2. /* ----------------------------------------------------------------------------
  3. the blog index template
  4. */
  5.  
  6. get_header();
  7.  
  8. //set the template id, used to get the template specific settings - this was the old home.php template
  9. $template_id = 'home';
  10.  
  11. //prepare the loop variables
  12. global $loop_module_id, $loop_sidebar_position;
  13. $loop_module_id = td_util::get_option('tds_' . $template_id . '_page_layout', 15); //module 1 is default
  14. $loop_sidebar_position = td_util::get_option('tds_' . $template_id . '_sidebar_pos'); //sidebar right is default (empty)
  15.  
  16. // sidebar position used to align the breadcrumb on sidebar left + sidebar first on mobile issue
  17. $td_sidebar_position = '';
  18. if($loop_sidebar_position == 'sidebar_left') {
  19. $td_sidebar_position = 'td-sidebar-left';
  20. }
  21. ?>
  22.  
  23. <div class="td-main-content-wrap">
  24.  
  25. <div class="td-container td-blog-index <?php echo $td_sidebar_position; ?>">
  26. <div class="td-crumb-container">
  27. <?php echo td_page_generator::get_home_breadcrumbs(); ?>
  28. </div>
  29. <div class="td-pb-row">
  30. <?php
  31. switch ($loop_sidebar_position) {
  32. default:
  33. ?>
  34. <div class="td-pb-span8 td-main-content">
  35. <div class="td-ss-main-content">
  36. <?php
  37. locate_template('loop.php', true);
  38. echo td_page_generator::get_pagination();
  39. ?>
  40. </div>
  41. </div>
  42. <div class="td-pb-span4 td-main-sidebar">
  43. <div class="td-ss-main-sidebar">
  44. <?php get_sidebar(); ?>
  45. </div>
  46. </div>
  47. <?php
  48. break;
  49.  
  50. case 'sidebar_left':
  51. ?>
  52. <div class="td-pb-span8 td-main-content <?php echo $td_sidebar_position; ?>-content">
  53. <div class="td-ss-main-content">
  54. <?php
  55. locate_template('loop.php', true);
  56. echo td_page_generator::get_pagination();
  57. ?>
  58. </div>
  59. </div>
  60. <div class="td-pb-span4 td-main-sidebar">
  61. <div class="td-ss-main-sidebar">
  62. <?php get_sidebar(); ?>
  63. </div>
  64. </div>
  65. <?php
  66. break;
  67.  
  68. case 'no_sidebar':
  69. td_global::$load_featured_img_from_template = 'full';
  70.  
  71. ?>
  72. <div class="td-pb-span12 td-main-content">
  73. <div class="td-ss-main-content">
  74. <?php
  75. locate_template('loop.php', true);
  76. echo td_page_generator::get_pagination();
  77. ?>
  78. </div>
  79. </div>
  80. <?php
  81. break;
  82. }
  83. ?>
  84. </div> <!-- /.td-pb-row -->
  85. </div> <!-- /.td-container -->
  86. </div> <!-- /.td-main-content-wrap -->
  87.  
  88. <?php
  89. get_footer();
Add Comment
Please, Sign In to add comment