I have a strange issue with a WordPress website. Somehow the second page of the blog isn’t loaded with a custom permalink setting. With the default setting it al works fine.

For example; the pagination shows the follow link http://www.magicwithin.coach/slide/blog/page/2/ but http://www.magicwithin.coach/slide/blog is loaded when the link is clicked. If I go to the first link directly the second link loads aswell.

I can’t seem to figure out what’s going wrong. Can someone help me?

To be sure, this is the pagination I use:

<?php 
    $paged = ( get_query_var( 'paged' ) ) ? absint( get_query_var( 'paged' ) ) : 1;

    $argus = array( 'post_per_page' => '5', 'paged' => $paged );
    $wp_query = new WP_Query( $argus );
    if ( $wp_query->have_posts() ): while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>

Pagination:

<?php global $wp_query; $big = 999999998;

                            echo paginate_links( array(
                                'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
                                'format' => '?paged=%#%',
                                'current' => max( 1, get_query_var('paged') ),
                                'prev_text' => '<<',
                                'next_text' => '>>',
                                'total' => $wp_query->max_num_pages
                                ) );
                        ?>

Read more here: Page 2 of my blog doesn’t load. Page 1 is reloaded insted


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: