-
-
Save alliejones/a00b7f319c5fd6b57f6a to your computer and use it in GitHub Desktop.
Single Posts Template I'm trying to modify to exclude sidebar based on post-category - refer to the code in section Line 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php get_header(); ?> | |
<div class="row"> | |
<div class="col-sm-12"> | |
<?php if (!$category_is_press): ?> | |
<?php get_sidebar(); ?> | |
<?php endif ?> | |
</div> | |
</div> | |
<div class="row"> | |
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> | |
<div class="col-sm-8 col-sm-offset-2"> | |
<article <?php post_class() ?> id="post-<?php the_ID(); ?>"> | |
<?php if(has_post_thumbnail()){ | |
the_post_thumbnail('large'); | |
}; | |
?> | |
<h1 class="single-entry-title"><?php the_title(); ?></h1> | |
<h2 class="subhead"><?php the_field('subhead'); ?></h2> | |
<?php include (TEMPLATEPATH . '/meta.php' ); ?> | |
<div class="entry-content"> | |
<?php the_content(); ?> | |
</div> | |
</article> | |
<?php endwhile; endif; ?> | |
</div> | |
</div> | |
<div class="row"> | |
<div class="col-sm-12"> | |
<?php related_posts() ?> | |
</div> | |
</div> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment