Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // the query to set the posts per page to 5
- $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
- $args = array('posts_per_page' => 5, 'cat' => 4, 'order' => 'DESC', 'paged' => $paged );
- query_posts($args); ?>
- <!-- the loop -->
- <?php if ( have_posts() ) : while (have_posts()) : the_post(); ?>
- <div class="entry" >
- <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_post_thumbnail(array(150,150), array('class' => 'alignleft shadow')); ?></a>
- <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
- <?php echo the_excerpt(30); ?>
- <p class="quick-read-more"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" class="readmore">Continue Reading...</a></p>
- </div>
- <hr />
- <?php endwhile; ?>
- <!-- pagination -->
- <div class="alignright"><?php next_posts_link(); ?></div>
- <div class="alignleft"><?php previous_posts_link(); ?></div>
- <?php else : ?>
- <!-- No posts found -->
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement