Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="article">
- <?php $latest_query = new WP_Query('category_name=latest&showposts=1');
- while ($latest_query->have_posts()) : $latest_query->the_post();
- $do_not_duplicate = $post->ID; ?>
- <article <?php post_class() ?> id="post-<?php the_ID(); ?>">
- <h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
- <div class="intro">
- <?php the_excerpt(''); ?>
- </div><!-- .intro -->
- <div class="time">
- <p><?php the_time('j F Y') ?></p>
- </div><!-- .time -->
- <div class="entry">
- <?php the_content('Continue reading'); ?>
- </div><!-- .entry -->
- </article><!-- .post -->
- </div><!-- .article -->
- <?php endwhile; ?>
- <div id="articles_head">
- <h2><span>§</span> From the recent past</h2>
- </div>
- <?php
- $args = array(
- 'post__not_in' => array($do_not_duplicate),
- 'posts_per_page' => 3
- );
- query_posts($args);
- global $wp_query;
- $maxposts = $wp_query->post_count;
- ?>
- <?php if (have_posts()) : while (have_posts()) : the_post();
- <div class="articles_recent">
- <?php $class = (($wp_query->current_post +1) == $maxposts) ? 'last-post': ''; ?>
- <article <?php post_class($class) ?> id="post-<?php the_ID(); ?>">
- <p class="time"><?php the_time('j F Y') ?></p>
- <h3><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h3>
- <div class="entry">
- <?php the_excerpt (''); ?>
- </div><!-- .entry -->
- </article><!-- .post -->
- </div><!-- .articles_recent -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement