• Resolved djurban

    (@djurban)


    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/ 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)
  • 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/ and post the link to it here.

    a link to your site might also help.

    Thread Starter djurban

    (@djurban)

    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/

    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

    (@djurban)

    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.