sjb_before_main_content
*
* @hooked sjb_job_listing_wrapper_start - 10
* - Output Opening div of Main Container.
* - Output Opening div of Content Area.
*
* @since 2.2.0
* @since 2.2.3 Removed the content wrapper opening div
*/
do_action('sjb_before_main_content');
?>
'15',
'post_type' => 'jobpost',
'paged' => $paged,
)
);
// Merge WP_Query $args array on each $_GET element
$args['jobpost_category'] = ( NULL != filter_input(INPUT_GET, 'selected_category') && -1 != filter_input(INPUT_GET, 'selected_category') ) ? sanitize_text_field(filter_input(INPUT_GET, 'selected_category')) : '';
$args['jobpost_job_type'] = ( NULL != filter_input(INPUT_GET, 'selected_jobtype') && -1 != filter_input(INPUT_GET, 'selected_jobtype') ) ? sanitize_text_field(filter_input(INPUT_GET, 'selected_jobtype')) : '';
$args['jobpost_location'] = ( NULL != filter_input(INPUT_GET, 'selected_location') && -1 != filter_input(INPUT_GET, 'selected_location') ) ? sanitize_text_field(filter_input(INPUT_GET, 'selected_location')) : '';
$args['s'] = ( NULL != filter_input(INPUT_GET, 'search_keywords') ) ? sanitize_text_field( (filter_input(INPUT_GET, 'search_keywords') ) ) : '';
// Job Query
$job_query = new WP_Query($args);
/**
* Fires before listing jobs on job listing page.
*
* @since 2.2.0
*/
do_action( 'sjb_job_filters_before' );
/**
* Template -> Job Filters:
*
* - Keywords Search.
* - Job Category Filter.
* - Job Type Filter.
* - Job Location Filter.
*
* Search jobs by category, location, type and keywords.
*/
get_simple_job_board_template( 'job-filters.php' );
/**
* Template -> Job Listing Start:
*
* - SJB Starting Content Wrapper div.
*/
get_simple_job_board_template( 'listing/job-listings-start.php' );
if ($job_query->have_posts()):
global $counter;
$counter = 1;
while ($job_query->have_posts()): $job_query->the_post();
/**
* Hook -> sjb_job_listing_view
*
* @hooked sjb_job_listing_view - 10
*
* Display the user defined job listing view:
*
* - Either job listing grid view or list view.
*
* @since 2.2.3
*/
do_action( 'sjb_job_listing_view' );
endwhile;
/**
* Template -> Pagination:
*
* - Add Pagination to Resulted Jobs.
*/
get_simple_job_board_template( 'listing/job-pagination.php', array( 'job_query' => $job_query ) );
else:
/**
* Template -> No Job Found:
*
* - Display Message on No Job Found.
*/
get_simple_job_board_template( 'listing/content-no-jobs-found.php' );
endif;
wp_reset_postdata();
/**
* Fires after listing jobs on job archive page.
*
* @since 2.2.0
*/
do_action( 'sjb_job_listing_after' );
/**
* Template -> Job Listing End:
*
* - SJB Ending Wrapper div.
*/
get_simple_job_board_template( 'listing/job-listings-end.php' );
?>