Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <?php
  2. /**
  3. * The template for displaying the full width grid section.
  4. *
  5. * @package WordPress
  6. * @subpackage Edition
  7. * @since Edition 1.0
  8. */
  9. global
  10. $tw_order_class, // section order
  11. $tw_section, // section object
  12. $paged_section, // section pagination
  13. $grid_size; // grid size
  14.  
  15. $section_post_type = get_field('section_post_type');
  16. $tw_section = themewich_section_object(); // section post options
  17. $section_post = $post; // Store Section Post
  18. $grid_size = 'fullgrid'; // Set first grid class
  19.  
  20. // Set post classes
  21. $tw_section->post_classes = array(
  22. 'no-top-margin',
  23. 'grid',
  24. 'grid-full',
  25. 'section',
  26. $tw_order_class,
  27. $tw_section->title_class
  28. ); ?>
  29.  
  30. <div <?php post_class($tw_section->post_classes); ?>>
  31. <?php themewich_section_edit(); // edit button ?>
  32.  
  33. <div class="container">
  34. <div class="imagegrid full col-md-12">
  35. <?php get_template_part( TW_SECTIONS_DIR .'/section-title'); // Section title ?>
  36. <div class="loading"></div>
  37. <div class="grid-wrapper" id="section-<?php the_ID(); ?>">
  38. <div class="homeposts grid-full">
  39. <div class="isotopecontainer" data-value="3">
  40. <?php
  41. // for pagination
  42. global $wp_query;
  43. $paged_section = isset( $_GET['paged_section'] ) ? (int) $_GET['paged_section'] : 1;
  44.  
  45. // Additional query arguments
  46. $args = array(
  47. 'ignore_sticky_posts' => 1, // Ignore Sticky Posts
  48. 'post_type' => array('post','articles','reviews',),
  49. 'paged' => $paged_section, // Add pagination
  50. );
  51.  
  52. // Filter the latest posts by type chosen
  53. $args = themewich_post_args($args);
  54.  
  55. wp_reset_query(); // Reset query
  56. $wp_query = new WP_Query($args); // Query the posts
  57.  
  58. // Start the loop
  59. while ($wp_query->have_posts()) : $wp_query->the_post();
  60. ?>
  61.  
  62. <div class="isobrick">
  63. <?php get_template_part(TW_TEMPLATES_DIR . '/template-grid'); ?>
  64. </div>
  65.  
  66. <?php
  67. $grid_size = 'halfgrid'; // Sest remaining grid size
  68. endwhile; // End Loop
  69. ?>
  70. <div class="clear"></div>
  71. </div>
  72.  
  73. <?php
  74. if ($tw_section->section_pagination != 'off') :
  75. themewich_pagination();
  76. endif; // end if pagination
  77. ?>
  78.  
  79. <?php wp_reset_query(); // Reset Query ?>
  80.  
  81. </div><!--.homeposts-->
  82. </div><!--.gridwrapper-->
  83. </div><!--.imagegrid-->
  84. <div class="clear"></div>
  85.  
  86. </div><!--.container-->
  87. </div><!--.homesection-->