wordpress pagination problem
-
hey,
i need your help friends…
i cant set pagination in my own theme
i tested plugins and manually but i cant
i think my loop in theme has issue. i am writing my loop code here please help me<?php if ( have_posts() ) : ?>
<?php query_posts(‘cat=20&posts_per_page=2’);
while (have_posts()) : the_post();
?><?php
$thumbnail_id = get_post_thumbnail_id();
$thumbnail_url = wp_get_attachment_image_src ( $thumbnail_id,
‘thumbnail-size’, TRUE );
$thumbnail_meta = get_post_meta( $thumbnail_id, ‘_wp_attachment_image_alt’, TRUE );
?><div class=”col-md-5″>
“>
<h4><?php the_title(); ?></h4>
<img alt=”<?php echo $thumbnail_meta; ?>” class=”img-responsive” src=”<?php echo $thumbnail_url[0]; ?>” />
</div><?php endwhile; ?>
<div class=”nav-previous”>
<?php previous_posts_link( ‘Older posts’ ); ?>
</div><div class=”nav-next”>
<?php next_posts_link( ‘newer posts’ ); ?>
</div><?php else : ?>
<p><?php _e(‘Sorry, no posts matched your criteria’) ?></p>
<?php endif; ?><?php wp_reset_query(); ?>
- The topic ‘wordpress pagination problem’ is closed to new replies.