WP query posts pagination doesn’t work

After addig a query_posts code to my WP template index.php file my pagination is not working anymore. I did use search and tried a few methods but nothing seems to work for me.

All I did was to add the line <?php if ( is_home() ) {query_posts( 'cat=-85' );}?> to this code:

Read More
<?php get_header(); ?>
    <div id="primary" class="content-area clr">
        <div id="content" class="site-content" role="main">
            <div class="container clr">
                <div id="post" class="col col-1 span_3_of_4 clr">

                    <?php if ( is_home() ) {query_posts( 'cat=-85' );}?>
                    <?php while ( have_posts() ) : the_post(); ?>
                        <?php get_template_part( 'content', get_post_format() ); ?>
                    <?php endwhile; ?>
                    <?php wpex_pagination(); ?>
                </div><!-- #post -->     
                <?php get_sidebar(); ?>
            </div><!-- #post -->
        </div><!-- #content -->
    </div><!-- #primary -->
<?php get_footer(); ?>

Can you help me?

Related posts

Leave a Reply

1 comment

  1. I found the solution:

    <?php if ( is_home() ) {
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts($query_string . '&cat=-85&paged='.$paged);
    } ?>