-
-
Save rwilki/3ab9192955891f43ac01 to your computer and use it in GitHub Desktop.
Recent posts display
This file contains 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
<ul class="posts-list"> | |
<?php while (have_posts()) : the_post(); unset($prev); $m++; ?> | |
<li class="<?php if ($thumbSize == 'Small') { echo 'secondary'; } else { echo 'full-width'; } ?>" id="post-<?php the_ID(); ?>"> | |
<?php | |
if ($thumbSize == 'Small') { | |
?> | |
<div class="cover"> | |
<?php get_the_image( array( 'size' => 'loop-main', 'width' => 140, 'height' => 85, 'before' => '', 'after' => '' ) ); ?> | |
<p class="postmetadata"><?php if (option::get('display_date') == 'on') { ?><time datetime="<?php the_time("Y-m-d"); ?>" pubdate><?php the_time("F j Y"); ?></time><?php } ?> | |
<?php if (option::get('display_category') == 'on') { ?><span class="category"><?php the_category(', '); ?></span><?php } ?> | |
<?php if (option::get('display_comments') == 'on') { ?><span class="comments"><?php comments_popup_link( __('0 comments', 'wpzoom'), __('1 comment', 'wpzoom'), __('% comments', 'wpzoom'), '',''); } ?></span></p> | |
</div><!-- end .cover --> | |
<div class="post-excerpt"> | |
<h2 class="title title-xsmall"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'wpzoom' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> | |
<?php the_excerpt(); ?> | |
</div><!-- end .post-excerpt --> | |
<?php | |
} else { | |
if ($thumbSize == 'Large') { | |
get_the_image( array( 'size' => 'homepage-slider', 'width' => 620, 'height' => 250, 'image_class' => 'cover') ); | |
} elseif ($thumbSize == 'Full') { | |
get_the_image( array( 'size' => 'featured-image-narrow', 'width' => 650, 'height' => 250, 'image_class' => 'cover-wide') ); | |
} ?> | |
<p class="postmetadata"><?php if (option::get('display_date') == 'on') { $prev = TRUE; ?><time datetime="<?php the_time("Y-m-d"); ?>" pubdate><?php the_time("F j, Y"); ?></time><?php } ?> | |
<?php if (option::get('display_category') == 'on') { if ($prev) { echo ' / '; } $prev = TRUE; ?><span class="category"><?php the_category(', '); ?></span><?php } ?> | |
<?php if (option::get('display_comments') == 'on') { if ($prev) { echo ' / '; } $prev = TRUE; ?><span class="comments"><?php comments_popup_link( __('0 comments', 'wpzoom'), __('1 comment', 'wpzoom'), __('% comments', 'wpzoom'), '',''); } ?></span></p> | |
<h2 class="title title-medium"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'wpzoom' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title_attribute(); ?></a></h2> | |
<?php the_excerpt(); ?> | |
<?php } ?> | |
<div class="cleaner"> </div> | |
<div class="seps"> </div> | |
</li><!-- end .secondary #post-<?php the_ID(); ?>--> | |
<?php endwhile; ?> | |
</ul><!-- end .posts-list --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment