Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php // Check if there are any posts to display
- if ( have_posts() ) : ?>
- <h1 class="archive-title"><?php single_cat_title( '', true ); ?></h1>
- <?php if ( category_description() ) : ?>
- <h5 class="slug-line"><?php echo category_description(); ?></h5>
- <?php endif; ?>
- <hr>
- <?php while ( have_posts() ) : the_post(); ?>
- <?php if( $wp_query->current_post == 0 && !is_paged() ) : //first post in loop// ?> <!--COLUMN 1-->
- <div id="column1">
- <h2 class="section-title">Latest Story</h2>
- <div class="item">
- <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
- <small><?php the_time('F jS, Y') ?></small>
- <div class="entry">
- <?php the_content(); ?>
- <p class="postmetadata"><?php _e( 'Posted in' ); ?> <em><?php the_category( ', ' ); ?> on <?php the_time('F jS, Y') ?></em></p>
- </div>
- <div class="comments-template">
- <?php comments_template();?>
- </div>
- </div>
- </div><!--column1-->
- <?php else : //other posts in loop// ?>
- <div id="column2">
- <h2 class="section-title">More Stories</h2>
- <div class="item article-preview">
- <h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
- <p class="date-stamp"><?php the_time('F jS, Y') ?></small></p>
- <?php if ( has_post_thumbnail()) : ?>
- <?php the_post_thumbnail('thumbnail', array('class' => 'articlethumb')); ?>
- <?php endif; ?>
- <div class="entry">
- <?php the_excerpt(); ?>
- <p class="postmetadata"><?php _e( 'Posted in' ); ?> <em><?php the_category( ', ' ); ?> on <?php the_time('F jS, Y') ?></em></p>
- </div>
- <div class="comments-template">
- <?php comments_template();?>
- </div>
- </div>
- <?php endif; //ends oter posts in loop// ?>
- <?php endwhile; ?>
- <div class="navigation">
- <?php posts_nav_link(); ?>
- </div>
- <?php else : ?>
- <p>Sorry - no posts found</p>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement