Title: Previous posts problem
Last modified: August 19, 2016

---

# Previous posts problem

 *  [Mihai Joldis](https://wordpress.org/support/users/misulicus/)
 * (@misulicus)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/previous-posts-problem/)
 * hey there,..
 * i used a code on the index.php template (using a different theme) that will hide
   posts from specific categories from showing
 *     ```
       <?php
          if (is_home()) {
             query_posts("cat=-141,-140,-3");
          }
       ?>
       ```
   
 * the code works..cause the posts from that categories don`t show..but now i seem
   to have another problem
    The previous Entries & Next Entries keep showing me 
   the same index page.. if i remove the code from the index template the links 
   work fine
 * how to make it so i can keep hiding the posts and the links to work
 * thanks

Viewing 1 replies (of 1 total)

 *  [stvwlf](https://wordpress.org/support/users/stvwlf/)
 * (@stvwlf)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/previous-posts-problem/#post-1038423)
 *     ```
       <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
             query_posts("cat=-141,-140,-3&paged=$paged"); ?>
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Previous posts problem’ is closed to new replies.

## Tags

 * [categories](https://wordpress.org/support/topic-tag/categories/)
 * [page navi](https://wordpress.org/support/topic-tag/page-navi/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [stvwlf](https://wordpress.org/support/users/stvwlf/)
 * Last activity: [17 years, 2 months ago](https://wordpress.org/support/topic/previous-posts-problem/#post-1038423)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
