I am introducing a WP_Query loop inside a custom post type. To get pagination to work (and to allow the user to go to /page/2, /page/3, etc.) I had to add the following code to my functions.php file:
add_filter( 'redirect_canonical', 'custom_disable_redirect_canonical' ); function custom_disable_redirect_canonical( $redirect_url ) { if ( is_paged() && is_singular() ) $redirect_url = false; return $redirect_url; } |