Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #3130

    Hi,

    Pagination is not working viewing categories. The buttons at the bottom (1,2,3,etc) shows up, and will take you to the correct page /page/2/ but that page will display the same 10 posts as the first page.

    Example:

    http://www.foxepractice.com/dev/lhj/knee-faq/

    http://www.foxepractice.com/dev/lhj/knee-faq/page/2/

    http://www.foxepractice.com/dev/lhj/knee-faq/page/3/

    http://www.foxepractice.com/dev/lhj/knee-faq/page/4/

    Only change I have done for this “Knee-faq” category is to make order=ASC.

    From archive.php:

    <div class=”archiveentry entry”>

    <?php

    if ( is_category(array(14,16,17)) ) {

    $category = get_the_category();

    query_posts(‘&order=ASC&cat=’.$category[0]->cat_ID);

    }

    if (have_posts()) :

    while (have_posts()) : the_post();

    $more = 0;

    $extraclass = ‘noImage’;

    $terms = get_the_term_list( $post->ID, ‘portfolio_entries’, ”, ‘, ‘, ” );

    #40753

    Hey,

    I made various tests with avisio and my test server and I couldn’t reproduce the pagination problem.

    1) Check if you use any redirection plugins, etc. – the often break pagination

    2) I don’t understand what you’re trying to achieve here. You don’t need to check the category because an archive page displays only one category if the user selects only one category. WP will query a certain category. I think you can replace the code above:

    if ( is_category(array(14,16,17)) ) {
    $category = get_the_category();
    query_posts('&order=ASC&cat='.$category[0]->cat_ID);
    }

    with:

    if ( is_category(array(14,16,17)) ) {
    query_posts($query_string . '&order=ASC');
    }

    and it will do exactly the same and maybe even solve the pagination problem…

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Pagination not working’ is closed to new replies.