• pagination not working gives the page not found error here is my code

    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
        $country = array(
            'cat' => $catID,
            'post_type' => 'clients',
            'order' => 'ASC',
            'post_parent' => 0,
            'showposts' => 30,
            'paged' =>  $paged
        );
        $getCountry = new WP_Query($country);
        while ($getCountry->have_posts()) : $getCountry->the_post();
            ?>
            <ul>
                <li>
                    <div class="col-lg-12">
                        <?php
                        $category = get_the_category();
                        $value = get_field('cat_image', 'category_' . $category[0]->cat_ID);
                        ?>
                        <a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
                    </div>
                </li>
            </ul>
            <?php
        endwhile;
        wp_pagenavi(array('query' => $getCountry));
        wp_reset_postdata();

The topic ‘pagination not working’ is closed to new replies.