Hi,
which permalinks structure are you using please? Does the problem occur if you switch to a different permalinks structure? If you are using a custom permalinks structure, it might help if you edit the following code in “search.php”:
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' => __( '← Previous', 'happenstance' ),
'next_text' => __( 'Next →', 'happenstance' ),
'total' => $wp_query->max_num_pages,
'add_args' => false
) );
in this way:
echo paginate_links( array(
'format' => '?paged=%#%',
'current' => max( 1, get_query_var('paged') ),
'prev_text' => __( '← Previous', 'happenstance' ),
'next_text' => __( 'Next →', 'happenstance' ),
'total' => $wp_query->max_num_pages,
'add_args' => false
) );
I am going to remove the “base” argument in a future update as it is no longer necessary in the latest WordPress version, but it might break the URL addresses of search results with some permalinks structures.
Best regards,
Tomas Toman
Now everything’s working great. Thank you very much!