• I was wondering, I recently just found out not all my pages for categories are working properly and I was wondering why?

    WordPress reads that for example News has 23 pages but yet only loads around 18 pages, Albums has 143 pages but stops working at page 85+

    Was wondering what Is going on??

    Any help would be appreciated.

    my website address is

    urbanmusichq.se

    I used this in functions to create the function

    function wp_pagenavi( $p = 6 ) { // pages will be show before and after current page
      if ( is_singular() ) return; // don't show in single page
      global $wp_query, $paged;
      $max_page = $wp_query->max_num_pages;
      if ( $max_page == 1 ) return; // don't show when only one page
      if ( empty( $paged ) ) $paged = 1;
      echo '<span class="pages">Page: ' . $paged . ' of ' . $max_page . ' </span> '; // pages
      if ( $paged > $p + 1 ) p_link( 1, 'First' );
      if ( $paged > $p + 2 ) echo '... ';
      for( $i = $paged - $p; $i <= $paged + $p; $i++ ) { // Middle pages
        if ( $i > 0 && $i <= $max_page ) $i == $paged ? print "<span class='page-numbers current'>{$i}</span> " : p_link( $i );
      }
      if ( $paged < $max_page - $p - 1 ) echo '... ';
      if ( $paged < $max_page - $p ) p_link( $max_page, 'Last' );
    }
    function p_link( $i, $title = '' ) {
      if ( $title == '' ) $title = "Page {$i}";
      echo "<a class='page-numbers' href='", esc_html( get_pagenum_link( $i ) ), "' title='{$title}'>{$i}</a> ";
    }
    function custom_excerpt_length( $length ) {
    	return 20;
    }
    add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );

    and called it using this

    <nav class="pagenavi"><?php wp_pagenavi();?></nav>

    I then tried a plugin called WP-PageNavi and that did the exact same error.

    What could it be?

    [ No bumping please. ]

  • The topic ‘Pagination Is Messed Up’ is closed to new replies.