<?php
/**
* The template for displaying category pages
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Emphires
* @since 1.0
* @version 1.0
*/
get_header(); ?>
<div id="primary-job" class="content-area <?php if( pbmit_check_sidebar() ) { ?>col-md-12 col-lg-12<?php } ?>">
<main id="main" class="site-main">
<?php
$atts = array();
$atts['style'] = pbmit_get_base_option('jobs-cat-style');
$atts['style'] = str_replace('style-','', $atts['style'] );
$atts['column'] = pbmit_get_base_option('jobs-cat-column');
$atts['show'] = pbmit_get_base_option('jobs-cat-count');
// Starting container
echo pbmit_element_container( array(
'position' => 'start',
'cpt' => 'jobs',
'data' => $atts
) );
// Get the terms and order them by count in descending order.
if ( have_posts() ) :
$style = pbmit_get_base_option('jobs-cat-style');
$column = pbmit_get_base_option('jobs-cat-column');
$style = str_replace('style-','', $style );
?>
<div class="pbmit-element-posts-wrapper row multi-columns-row">
<?php
/* Start the Loop */
while ( have_posts() ) : the_post();
if( file_exists( get_template_directory() . '/theme-parts/jobs/jobs-style-'.$style.'.php' ) ){
echo pbmit_element_block_container( array(
'position' => 'start',
'column' => $column,
'cpt' => 'jobs',
'style' => $style,
) );
// calling template
include( get_template_directory() . '/theme-parts/jobs/jobs-style-'.$style.'.php' );
echo pbmit_element_block_container( array(
'position' => 'end',
) );
} else {
echo '<!-- Template file not found -->';
} ?>
<?php endwhile; ?>
<?php
// Ending wrapper of the whole arear
echo pbmit_element_container( array(
'position' => 'end',
'cpt' => 'jobs',
'data' => $atts
) );
?>
<?php
/* Restore original Post Data */
wp_reset_postdata();
?>
</div><!-- .pbmit-element-cat-wrapper row multi-columns-row -->
<?php
// Pagination
pbmit_pagination();
else :
get_template_part( 'template-parts/post/content', 'none' );
endif;
?>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_footer();