Skip to content

Instantly share code, notes, and snippets.

@lunacodes
Created July 27, 2015 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lunacodes/41e4d8034e43a5b89464 to your computer and use it in GitHub Desktop.
Save lunacodes/41e4d8034e43a5b89464 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
<?php get_header(); ?>
<div class="row">
<div class="col-sm-12">
<?php get_sidebar(); ?>
</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