Advertisement
Guest User

Untitled

a guest
Sep 19th, 2013
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. <?php
  2. $temp = $wp_query;
  3. $wp_query= null;
  4. $wp_query = new WP_Query();
  5. $wp_query->query('posts_per_page=1'.'&paged='.$paged);
  6. while ($wp_query->have_posts()) : $wp_query->the_post();
  7. ?>
  8.  
  9. <div class="blog-post">
  10.  
  11. <div class="post-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Fixed link <?php the_title_attribute(); ?>"><?php the_title(); ?></a></div><!--post-title-->
  12.  
  13. <div class="post-details">
  14. <div class="post-details-category"><?php the_category(' ') ?></div><div class="post-details-spacer"></div>
  15. <div class="post-details-author"><a href="<?php echo get_author_posts_url(get_the_author_meta( 'ID' )); ?>"><?php the_author_meta('display_name'); ?></a></div><div class="post-details-spacer"></div>
  16. <div class="post-details-date"><?php the_time('F j, Y') ?></div><div class="post-details-spacer"></div>
  17. <div class="post-details-comments"><?php comments_number('0', '1', '%'); ?></div><div class="post-details-spacer"></div>
  18. </div>
  19.  
  20. <?php
  21. if ( has_post_thumbnail() ) { ?>
  22. <div class="thumbnail">
  23. <?php the_post_thumbnail('post-thumbnail');
  24. the_post_thumbnail_caption(); ?>
  25. </div>
  26. <?php } else {
  27. // no thumbnail
  28. }
  29. ?>
  30.  
  31. <div class="text">
  32.  
  33. <?php
  34. $subtitle = get_post_meta ($post->ID, 'subtitle', $single = true);
  35. if($subtitle !== '') {
  36. echo '<div class="subtitle">';
  37. echo $subtitle;
  38. echo '</div>';
  39. }
  40. ?>
  41.  
  42. <?php
  43. global $more;
  44. $more = 0;
  45. the_content();
  46. ?>
  47.  
  48. </div><!--text-->
  49.  
  50. <div class="clear"></div>
  51. <a class="more" href="<?php the_permalink() ?>"><?php echo of_get_option('t-21', 'Read more' ) ?></a>
  52.  
  53. </div><!--blog-post-->
  54.  
  55. <?php endwhile; // end of loop
  56. ?>
  57.  
  58. <?php $wp_query = null; $wp_query = $temp;?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement