Fix Pagination in Oblivion Theme

  • In Progress
    Posted in: Oblivion  
  • Member
    WebdesignKronberg
    February 27, 2016 at 3:59 pm #77423

    Hello everybody,

    I figured out, that the pagination doesn’t work on all archive pages.
    So I searched in the Code for the answer.
    In the file “archive.php” you call this to get the max number of pages:

    $additional_loop = new WP_Query('paged='.$paged );
    $page=$additional_loop->max_num_pages;
    echo kriesi_pagination($additional_loop->max_num_pages);
    wp_reset_query();

    This is completely unnessesary and only generates page load time!
    I had to override the whole page in my child theme.
    Wordpress already calls the WP-Query-Function so the Theme must not do this.

    My Fix for this issue:

    global $wp_query;
    echo kriesi_pagination($wp_query->max_num_pages);

    Please fix this error.

    Thank You for your answer.

    Sorry, this forum is for verified users only. Please Login or Register to continue

Comments are closed.