Title: Problem with page navigation
Last modified: August 19, 2016

---

# Problem with page navigation

 *  Resolved [djurban](https://wordpress.org/support/users/djurban/)
 * (@djurban)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/problem-with-page-navigation-1/)
 * Hi everyone.
 * I have a problem with page navigation when i install wp-navi plugin or when i
   try to navigate to pages in my web directly (i means tipyng on the browser) Eg:
   [http://mydomain.com/page/2/](http://mydomain.com/page/2/) it always shows me
   the home page…
 * I dont know what to do. Please help me…

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/problem-with-page-navigation-1/#post-1555887)
 * are you using a custom query in your front page (index.php ?)
 * if so it may be missing the ‘paged’ parameter:
    see below how to integrate it.
 *     ```
       $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
       $args = array(
       'posts_per_page' => 10, // optional to overwrite the dashboard setting
       'cat' => 0,
       'paged' => $paged
       );
       query_posts($args); 	?>
       ```
   
 * substitute your own query parameters.
 * or:
 *     ```
       $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
       query_posts('posts_per_page=10&cat=0&paged='.$paged'); ?>
       ```
   
 * again, put your own query parameters in.
 * if this does not help, paste the code of index.php into a [http://wordpress.pastebin.com/](http://wordpress.pastebin.com/)
   and post the link to it here.
 * a link to your site might also help.
 *  Thread Starter [djurban](https://wordpress.org/support/users/djurban/)
 * (@djurban)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/problem-with-page-navigation-1/#post-1555893)
 * hi, i have nothing on my index, i just have this query on home.php
 *     ```
       <?php
                   $post = $wp_query->post;
                        $id = $wpdb->get_var("SELECT term_id FROM $wpdb->terms WHERE slug='" .get_option('gallery-category') ."'");
   
                          ?>
   
                <?php if (have_posts()) : ?>
       <?php query_posts('cat=-' .$id .''); ?>
   
                       <?php while (have_posts()) : the_post(); ?>
       ```
   
 * this is the theme im using [http://www.gorillathemes.com/tribal/](http://www.gorillathemes.com/tribal/)
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/problem-with-page-navigation-1/#post-1555897)
 * home.php is the right file.
 * in your code, try and change:
    `query_posts('cat=-' .$id .'');`
 * to:
 *     ```
       $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
       query_posts('cat=-' .$id .'&paged='.$paged);
       ```
   
 *  Thread Starter [djurban](https://wordpress.org/support/users/djurban/)
 * (@djurban)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/problem-with-page-navigation-1/#post-1555900)
 * Well, i have deleted this hole line `query_posts('cat=-' .$id .'');`
 * an the page navigation works fine… Thanks alchymyth…
 * Topic solved.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Problem with page navigation’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [djurban](https://wordpress.org/support/users/djurban/)
 * Last activity: [15 years, 10 months ago](https://wordpress.org/support/topic/problem-with-page-navigation-1/#post-1555900)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
