Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am writing here because after hours and hours I can't fix my problem.

  1. I am using a Custom Theme
  2. I am using the plugin wp-navi

My pagination works fine. The problem is to display categories when I want to filter by categories.

This is my query:

<?php $args = array(
    'post_type' => 'post',
    'orderby' => 'date',
    'posts_per_page' => 5,
    'paged' => get_query_var('paged'));

    <?php if (have_posts()) :  ?>
    <?php while (have_posts()) : the_post(); ?>
// My loop

<?php endwhile;?>

        <?php endif; ?>

        <?php if(function_exists('wp_pagenavi')) wp_pagenavi();  ?>

BUT when I click in my side-bar (sidebar.php) to filter by category (example: technologie), I have as URL: www.mywebsite.com/Blog/?cat=2

But nothing change, I continue to see all my posts.

When I delete:


the pagination doesn't work, but the filter system works

Thank you for your help :)


share|improve this question
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.