Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter enimatto

    (@enimatto)

    Thank you for some clues.

    I made something like this:

    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts(array(
    'cat' => '9',
    'posts_per_page' => '1',
    'paged'=>$paged,
    ));

    Pagination seems to work, but I have on every category posts from only the one category: ID 9.

    If I use:

    if (is_category(array('9')) ) {
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts(array(
    'cat' => '9',
    'posts_per_page' => '1',
    'paged'=>$paged,
    ));
    }

    then every category displays adequate posts. When we go to category ID 9, then we have of course right pagination at bottom, 1 post per page, like settings above.. But when I click for example “next page” or “page 2” or “page 3”
    then I have still no posts – Nothing Found.

    Any idea what is wrong?

    Thread Starter enimatto

    (@enimatto)

    One more thing.
    when I use this code:

    <?php
    global $query_string;
    parse_str( $query_string, $args );
    if (is_home()){
    $args['posts_per_page'] = 5;
    query_posts($args);
    }
    ?>

    works perfect.
    but as you see, only for home page.
    There is no problem with display next posts.
    Only when I use “if (is_category..” there is problem.

    Thread Starter enimatto

    (@enimatto)

    any idea?
    Why pagination “doesn’t see” next posts?

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