Skip to content

Instantly share code, notes, and snippets.

@aristath
Created July 4, 2014 12:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aristath/cdf564849f5dc71a3bc6 to your computer and use it in GitHub Desktop.
Save aristath/cdf564849f5dc71a3bc6 to your computer and use it in GitHub Desktop.
<?php get_header(); ?>
<section id="banner">
<div class="wrap">
<h2>Blog</h2>
<img src="/wp-content/uploads/2014/06/bannerBlog.jpg" alt="">
</div> <!-- /.wrap -->
</section> <!-- /#banner -->
<section id="breadcrumbs">
<div class="wrap">
<?php if(function_exists('bcn_display')) { bcn_display(); }?>
</div> <!-- /.wrap -->
</section> <!-- /#breadcrumbs -->
<section id="content">
<article>
<div class="timeline-with">
<div class="timeline-head"><i class="icon-chat-1"></i></div>
<ul class="timeline">
<?php
if(is_front_page()) { $paged = (get_query_var('page')) ? get_query_var('page') : 1; } else { $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;}
query_posts('posts_per_page=&paged='.$paged);
?>
<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
<li>
<div class="timeline-post clearfix">
<div class="timeline-dot">
<div class="timeline-date">
<?php
// If $temp_date is not defined, define it here
if ( ! isset( $temp_date ) ) {
$temp_date = get_the_date( 'MY' );
// Output the date
the_date('M Y', '<h5>', '</h5>');
}
// If $temp_date is the same as this post's date, then do nothing.
// If however they are different, then echo the month
if ( $temp_date != get_the_date( 'MY' ) ) {
// Output the date
the_date('M Y', '<h5>', '</h5>');
}
?>
</div><!-- /.timeline-date -->
</div><!-- /.timeline-dot -->
<!-- <div class="timeline-date"><span><?php the_time(get_option('date_format'));?></span></div> -->
<div class="timeline-post-wrap">
<?php if (has_post_thumbnail()) { ?>
<?php the_post_thumbnail( 'full' ); ?>
<?php } else { ?>
<!-- Do Nothing -->
<?php } ?>
<div class="post_info">
<h2 class="post-title"><a href="<?php the_permalink();?>"><?php the_title();?></a></h2>
<span>by <?php the_author(); ?> | <?php the_time(get_option('date_format'));?></span>
</div><!-- /.post_info -->
<p><?php echo excerpt(25); ?></p>
<div class="timeline-meta">
<a href="<?php the_permalink();?>" class="more"><?php echo __('Read More >')?></a>
<span class="timeline-comments"><i class="icon-comment"></i> <?php comments_number('0','1 comment','% comments')?></span>
</div><!-- /.timeline-meta -->
</div><!-- /.timeline-post-wrap -->
</div><!-- /.timeline-post .clearfix -->
</li>
<?php endwhile; endif;?>
</ul><!-- /.timeline -->
<div class="timeline-nav">
<div class="timeline-dot"></div>
<ul>
<li class="left-nav"><?php next_posts_link(__(' ', 'framework')); ?></li>
<li class="right-nav"><?php previous_posts_link(__(' ', 'framework')) ?></li>
</ul>
</div><!-- /.timeline-nav -->
<?php wp_reset_query(); //posts_nav_link(); ?>
</div><!-- /.timeline-with -->
<div class="clear"></div>
</article>
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment