• Dear community,

    I wanted to list only posts from one specific category, so I found how to define it within query_posts as stated below:

    <?php if ( have_posts() ) : ?>
    	<?php query_posts('cat=4'); ?>
    	<?php while ( have_posts() ) : the_post(); ?>
            <?php get_template_part( 'content', get_post_format() ); ?>
    <?php endwhile; ?>

    This works, but the pagination does not. Now I have found that I need to use WP_Query for this, but I have no idea how to implement it (I have read the documentation on www.remarpro.com as well).

    Could someone please help me to adjust the code above to have also functional pagination?

    Kindly thank you for your replies,
    Jan

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Query_posts with defined category prevents pagination’ is closed to new replies.