• update:
    I have to change index.php, search.php, and archives.php., as below. However, the home page, search page and category page now all show the same page numbers! But actually, they always have different pages. See https://www.ccgtc.org.

    Update:
    I figured out that: in the file “index.php”, find:
    <?php charitas_content_navigation(‘postnav’ ) ?>

    replace with:
    <?php
    // You need protect against arbitrary paged values
    $paged = ( get_query_var( ‘paged’ ) ) ? absint( get_query_var( ‘paged’ ) ) : 1;

    $args = array(
    ‘post_type’ => ‘post’,
    ‘posts_per_page’ => 6,
    ‘paged’ => $paged,
    );

    $my_query = new WP_Query( $args );

    if($my_query->have_posts()):
    while($my_query->have_posts()): $my_query->the_post();
    // Template loop here
    endwhile;
    echo easy_wp_pagenavigation( $my_query );
    else:
    // No result
    endif; wp_reset_postdata();
    ?>

    Then, in wordpress–>setting–>reading, change the page number to “6” (or another number which matches above.

  • The topic ‘New problem’ is closed to new replies.