Current File : /home/kelaby89/teamhachem.com/wp-content/themes/artkombat/archive.php |
<?php
/**
* The template for displaying Archive pages
*
* Used to display archive-type pages if nothing more specific matches a query.
* For example, puts together date-based pages if no date.php file exists.
*
* If you'd like to further customize these archive views, you may create a
* new template file for each specific one.
*
* @link http://codex.wordpress.org/Template_Hierarchy
*/
$artkombat_sidebar_hidden = false;
$artkombat_layout = 'classic';
$blog_class = '';
$wrap_layout = 'col-xl-8 col-lg-8 col-md-12';
if ( function_exists('FW') ) {
$artkombat_layout = fw_get_db_settings_option( 'blog_layout' );
if ( $artkombat_layout != 'classic' ) {
$blog_class = 'masonry';
}
}
if ( function_exists('FW') ) {
$sidebar = fw_get_db_settings_option( 'blog_list_sidebar' );
if ( $sidebar == 'hidden' ) {
$artkombat_sidebar_hidden = true;
$wrap_layout = 'col-xl-12 col-lg-12 col-md-12';
}
}
if ( !artkombat_check_active_sidebar() ) {
$artkombat_sidebar_hidden = true;
$wrap_layout = 'col-xl-12 col-lg-12 col-md-12';
}
get_header(); ?>
<div class="inner-page margin-default">
<div class="row centered">
<div class="<?php echo esc_attr($wrap_layout); ?> ltx-blog-wrap">
<div class="blog blog-block layout-<?php echo esc_attr($artkombat_layout); ?>">
<?php
if ( $wp_query->have_posts() ) :
echo '<div class="row '.esc_attr($blog_class).'">';
while ( $wp_query->have_posts() ) : the_post();
// Showing classic blog without framework
if ( !function_exists( 'FW' ) ) {
get_template_part( 'tmpl/content-post-one-col' );
}
else {
set_query_var( 'artkombat_layout', $artkombat_layout );
if ($artkombat_layout == 'three-cols') {
get_template_part( 'tmpl/content-post-three-cols' );
}
else
if ($artkombat_layout == 'two-cols') {
get_template_part( 'tmpl/content-post-two-cols' );
}
else {
get_template_part( 'tmpl/content-post-one-col' );
}
}
endwhile;
echo '</div>';
else :
// If no content, include the "No posts found" template.
get_template_part( 'tmpl/content', 'none' );
endif;
?>
<?php
if ( have_posts() ) {
artkombat_paging_nav();
}
?>
</div>
</div>
<?php
if ( !$artkombat_sidebar_hidden ) {
get_sidebar();
}
?>
</div>
</div>
<?php
get_footer();