• Hi
    I just start to design my own theme and I tested everything on localhost and everything was fine, but after that I uploaded my theme to my host I just installed one more plugin which is “Hide My Wp” so the limit for index posts is 12. now when I want to get to next page it’ll return to same page which is index also I’m not using any plugins to make page nav I use this:

    Functions.php

    function bittersweet_pagination() {
    
    global $wp_query;
    
    $big = 999999999; // need an unlikely integer
    
    $pages = paginate_links( array(
            'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
            'format' => '?paged=%#%',
            'current' => max( 1, get_query_var('paged') ),
    		'prev_next'    => True,
            'prev_text'    => __('<i class="fa fa-chevron-left"></i>'),
            'next_text'    => __('<i class="fa fa-chevron-right"></i>'),
            'total' => $wp_query->max_num_pages,
            'type'  => 'array',
        ) );
        if( is_array( $pages ) ) {
            $paged = ( get_query_var('paged') == 0 ) ? 1 : get_query_var('paged');
            echo '<div class="text-center" style="direction:ltr"><ul class="pagination pagination">';
            foreach ( $pages as $page ) {
                    echo "<li>$page</li>";
            }
           echo '</ul></div>';
            }
    }

    Index.php:
    <?php bittersweet_pagination(); ?>

    I tested this too on xampp and worked fine but now it doesn’t work
    https://www.animeio.com

Viewing 1 replies (of 1 total)
  • Thread Starter A

    (@mrex778)

    I even used this code but still same problem

    <div class="navigation"><p><?php posts_nav_link('∞','Go
    Forward In Time','Go Back in Time'); ?></p></div>
Viewing 1 replies (of 1 total)
  • The topic ‘Page Navigation Dosen't Work :(’ is closed to new replies.