Skip to content

Commit

Permalink
Updated page-blog.php template file to include conditional display of…
Browse files Browse the repository at this point in the history
… post-thumbnail.
  • Loading branch information
Rachel Baker committed Jun 3, 2013
1 parent d0db007 commit ed13c77
Showing 1 changed file with 47 additions and 36 deletions.
83 changes: 47 additions & 36 deletions templates-pages/page-blog.php
Expand Up @@ -7,55 +7,66 @@
* @subpackage BootstrapWP * @subpackage BootstrapWP
*/ */
get_header(); ?> get_header(); ?>
<?php while (have_posts()) : the_post(); ?> <div class="container">

<div class="row">
<div class="container"> <div class="span12">
<div class="row"> <?php if (function_exists('bootstrapwp_breadcrumbs')) {
<div class="span12"> bootstrapwp_breadcrumbs();
<?php if (function_exists('bootstrapwp_breadcrumbs')) { } ?>
bootstrapwp_breadcrumbs(); </div>
} ?> </div><!--/.row -->
</div><!--/.span12 -->
</div><!--/.row --> <div class="row content">

<header class="page-title">
<h1><?php the_title();?></h1>
</header>

<div class="row content">
<div class="span8"> <div class="span8">
<?php the_content(); ?> <?php while (have_posts()) : the_post(); ?>
<?php endwhile; <header class="page-title">
// reset the loop <h1><?php the_title();?></h1>
wp_reset_query(); ?> </header>
<hr/>
<?php the_content(); ?>
<hr/>

<?php // reset the loop
endwhile;
wp_reset_query(); ?>


<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; <?php // Blog post query
// Blog post query $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts(array('post_type' => 'post', 'paged' => $paged, 'showposts' => 0)); query_posts(array('post_type' => 'post', 'paged' => $paged, 'showposts' => 0));
if (have_posts()) : while (have_posts()) : the_post(); ?> if (have_posts()) : while (have_posts()) : the_post(); ?>


<div <?php post_class(); ?>> <div <?php post_class(); ?>>
<a href="<?php the_permalink(); ?>" title="<?php the_title();?>"> <a href="<?php the_permalink(); ?>" title="<?php the_title();?>">
<h3><?php the_title();?></h3></a> <h3><?php the_title();?></h3>
</a>
<p class="meta"> <p class="meta">
<?php echo bootstrapwp_posted_on();?> <?php echo bootstrapwp_posted_on();?>
</p> </p>


<div class="row"> <div class="row">
<div class="span2"> <?php // Post thumbnail conditional display.
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"> if ( bootstrapwp_autoset_featured_img() !== false ) : ?>
<?php echo bootstrapwp_autoset_featured_img(); ?></a> <div class="span2">
</div><!-- /.span2 --> <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute( 'echo=0' ); ?>">
<div class="span6"> <?php echo bootstrapwp_autoset_featured_img(); ?>
<?php the_excerpt();?> </a>
</div><!-- /.span6 --> </div>
<div class="span6">
<?php else : ?>
<div class="span8">
<?php endif; ?>
<?php the_excerpt(); ?>
</div>
</div><!-- /.row --> </div><!-- /.row -->

<hr/> <hr/>
</div><!-- /.post_class --> </div><!-- /.post_class -->
<?php endwhile; endif; ?>
<?php bootstrapwp_content_nav('nav-below'); ?> <?php // end of blog post loop.
</div><!-- /.span8 --> endwhile; endif; ?>

<?php bootstrapwp_content_nav('nav-below');?>
</div>


<?php get_sidebar('blog'); ?> <?php get_sidebar('blog'); ?>
<?php get_footer(); ?> <?php get_footer(); ?>

0 comments on commit ed13c77

Please sign in to comment.