Advertisement
Guest User

Untitled

a guest
Aug 21st, 2012
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.74 KB | None | 0 0
  1. <?php query_posts('showposts=1'); ('post_type=post&paged='.get_query_var('paged')); ?>  
  2.                   <?php if(have_posts()) : while(have_posts()) : the_post(); ?>
  3.                  
  4.                 <?php
  5.                   if ( has_post_thumbnail() ) {
  6.                   the_post_thumbnail();
  7.                    }
  8.                    else
  9.                    {
  10.                     get_the_image( array('size' => 'thumbnail', 'image_class' => 'wp-post-image'));  
  11.                    }
  12.  
  13. ?>
  14.                  
  15.                  
  16. <?php endwhile; ?>
  17.  
  18. <?php else : ?>
  19.  
  20.     <p class="no-posts"><?php _e('Sorry, no posts matched your criteria', 'example'); ?></p>
  21.  
  22. <?php endif; ?>
  23.   <?php wp_reset_query(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement