Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: Blog
- */
- ?>
- <?php get_header();?>
- <section id="content">
- <section id="main">
- <?php
- query_posts('posts_per_page=4');
- $c=0;
- $i=1;
- ?>
- <?php if (have_posts()) : ?>
- <?php while (have_posts()) : the_post(); $c++; ?>
- <article class="post<?php if($i%2 == 0) { echo ' right'; }; $i++; ?>" id="post-<?php the_ID(); ?>">
- <section class="entry">
- <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_post_thumbnail(); ?></a>
- </section>
- <section class="description">
- <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
- <time class="post-date" datetime="<?php the_time('c'); ?>"><?php the_time('F j, Y'); ?></time>
- </section>
- </article>
- <?php endwhile; ?>
- <?php if( $c < 4 ) : for ($dummy= $c; $dummy < 5; $dummy++;) : ?>
- <article class="post<?php if($i%2 == 0) { echo ' right'; }; $i++; ?>" id="post-<?php the_ID(); ?>">
- <img src="<?php bloginfo('template_url'); ?>/images/dummy-post.gif" alt="Post coming soon!" />
- </article><?php endfor;?>
- <?php endif;?>
- <?php endif; ?>
- <section id="map">
- <img src="<?php bloginfo('template_url') ?>/images/interactive-map.jpg" alt="Interactive Map" />
- </section>
- </section>
- <?php get_sidebar(); ?>
- </section>
- <?php get_footer(); ?>
Add Comment
Please, Sign In to add comment