content-job-listing-grid-view.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <?php
  2. /**
  3. * The template for displaying job content in grid view within loops.
  4. *
  5. * Override this template by copying it to yourtheme/simple_job_board/content-job-listing-grid-view.php
  6. *
  7. * @author PressTigers
  8. * @package Simple_Job_Board
  9. * @subpackage Simple_Job_Board/Templates
  10. * @version 2.0.0
  11. * @since 2.2.0
  12. * @since 2.2.3 Added @hook sjb_job_listing_heading_after.
  13. * @since 2.3.0 Added "sjb_grid_view_template" filter.
  14. * @since 2.4.0 Revised whole HTML template
  15. */
  16. ob_start();
  17. global $counter, $post_count;
  18. if ( 1 === $counter ) {
  19. echo '<div class="row">';
  20. }
  21. /**
  22. * Fires at start of a job listing on job listing page.
  23. *
  24. * @since 2.2.0
  25. */
  26. do_action('sjb_job_listing_grid_view_start');
  27. ?>
  28. <!-- Start Jobs Grid View
  29. ================================================== -->
  30. <div class="col-md-4 col-sm-6 grid-item">
  31. <div class="list-data">
  32. <!-- Grid view header -->
  33. <header>
  34. <div class="row">
  35. <?php
  36. /**
  37. * Template -> Logo:
  38. *
  39. * - Company Logo
  40. */
  41. get_simple_job_board_template('listing/grid-view/logo.php');
  42. /**
  43. * Template -> Title:
  44. *
  45. * - Job Title
  46. */
  47. get_simple_job_board_template('listing/grid-view/job-title-company.php');
  48. /**
  49. * Template -> Type:
  50. *
  51. * - Job Type
  52. */
  53. get_simple_job_board_template('listing/grid-view/type.php');
  54. /**
  55. * Template -> Location:
  56. *
  57. * - Job Location
  58. */
  59. get_simple_job_board_template('listing/grid-view/location.php');
  60. /**
  61. * Template -> Post Date:
  62. *
  63. * - Job Post Date
  64. */
  65. get_simple_job_board_template('listing/grid-view/posted-date.php');
  66. ?>
  67. </div>
  68. </header>
  69. <?php
  70. /**
  71. * Template -> Short Description:
  72. *
  73. * - Job Description
  74. */
  75. get_simple_job_board_template('listing/grid-view/short-description.php');
  76. ?>
  77. </div>
  78. <div class="clearfix"></div>
  79. </div>
  80. <!-- ==================================================
  81. End Jobs Grid View -->
  82. <?php
  83. /**
  84. * Fires at the end of a job listing on job listing page.
  85. *
  86. * @since 2.2.0
  87. */
  88. do_action('sjb_job_listing_grid_view_end');
  89. if ( $post_count === $counter){
  90. echo '</div>';
  91. }
  92. $counter++;
  93. $html_grid_view = ob_get_clean();
  94. /**
  95. * Modify the Job Listing Grid View Template.
  96. *
  97. * @since 2.3.0
  98. *
  99. * @param html $html_grid_view Job Listing Grid View HTML.
  100. */
  101. echo apply_filters('sjb_grid_view_template', $html_grid_view);