Advertisement
Guest User

Untitled

a guest
Dec 3rd, 2011
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. <div class="article">
  2.  
  3. <?php $latest_query = new WP_Query('category_name=latest&showposts=1');
  4. while ($latest_query->have_posts()) : $latest_query->the_post();
  5. $do_not_duplicate = $post->ID; ?>
  6.  
  7. <article <?php post_class() ?> id="post-<?php the_ID(); ?>">
  8.  
  9. <h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
  10.  
  11. <div class="intro">
  12.  
  13. <?php the_excerpt(''); ?>
  14.  
  15. </div><!-- .intro -->
  16.  
  17. <div class="time">
  18.  
  19. <p><?php the_time('j F Y') ?></p>
  20.  
  21. </div><!-- .time -->
  22.  
  23. <div class="entry">
  24.  
  25. <?php the_content('Continue reading'); ?>
  26.  
  27. </div><!-- .entry -->
  28.  
  29. </article><!-- .post -->
  30.  
  31. </div><!-- .article -->
  32.  
  33. <?php endwhile; ?>
  34.  
  35. <div id="articles_head">
  36.  
  37. <h2><span>&sect;</span> From the recent past</h2>
  38.  
  39. </div>
  40. <?php
  41. $args = array(
  42. 'post__not_in' => array($do_not_duplicate),
  43. 'posts_per_page' => 3
  44. );
  45. query_posts($args);
  46. global $wp_query;
  47. $maxposts = $wp_query->post_count;
  48. ?>
  49. <?php if (have_posts()) : while (have_posts()) : the_post();
  50.  
  51.  
  52. <div class="articles_recent">
  53.  
  54. <?php $class = (($wp_query->current_post +1) == $maxposts) ? 'last-post': ''; ?>
  55. <article <?php post_class($class) ?> id="post-<?php the_ID(); ?>">
  56.  
  57. <p class="time"><?php the_time('j F Y') ?></p>
  58.  
  59. <h3><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h3>
  60.  
  61. <div class="entry">
  62. <?php the_excerpt (''); ?>
  63. </div><!-- .entry -->
  64.  
  65. </article><!-- .post -->
  66.  
  67. </div><!-- .articles_recent -->
  68.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement