File size: 2.33Kb
<?php
/*
* Template Name: Wide
* Template Post Type: post
*/
//theme header
get_header();
//sidebar is hidden?
$weart_sidebar = get_post_meta($post->ID, "weart_hide_sidebar", true);
?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<!-- HEADER -->
<header class="article-header <?php if ( has_post_thumbnail() ) : ?>has-img c-white l-white <?php else: ?> c-black l-black<?php endif; ?>">
<?php if ( has_post_thumbnail() ) : ?>
<div class="bg bg-post" style="background-image: url(<?php the_post_thumbnail_url( 'full' ); ?>)"></div>
<?php endif; ?>
<div class="img-text">
<div class="container">
<div class="row">
<div class="col-lg-10 mb-3 mt-4 offset-lg-1">
<div class="meta row align-items-center d-none d-sm-flex">
<div class="col-lg-6 actual-meta">
<?php weart_by(array('color'=>'c-meta')) ?>
</div><!-- .actual-meta -->
<div class="col-lg-6 share">
<?php if ( shortcode_exists( 'ssba-buttons' ) ) { echo do_shortcode('[ssba-buttons]'); } ?>
</div>
</div><!-- .meta -->
<hr class="<?php if ( has_post_thumbnail() ) : ?>brd-bl<?php endif; ?> mb-4 mt-1 d-none d-sm-flex">
<h1 class="title f-main my-3 font-weight-bold"><?php the_title() ?></h1>
</div><!-- .col-lg-10 -->
</div><!-- .row -->
</div><!-- .container -->
</div><!-- .img-text -->
</header>
<!-- CONTENT -->
<div class="container post-container pt-4">
<div class="row pb-5">
<div class="col-lg-7 offset-lg-1
<?php if(!is_active_sidebar( 'sidebar-article') || $weart_sidebar == "hide" ){ ?>offset-lg-2<?php } ?>">
<?php get_template_part( 'parts/post','content' ) ?>
</div>
<?php get_sidebar(); ?>
</div>
</div>
</article>
<?php endwhile; else: weart_noposts(); endif; ?>
<?php if(get_theme_mod( 'want_home_related', 0 )){ ?>
<div class="home-recommendation pt-5">
<div class="container"><?php get_template_part( 'index' ); ?></div>
</div>
<?php } ?>
<?php get_footer() ?>