Forgive me for answering my own question, but this post gave me the answer I needed: WP_Query Pagination on single-custom.php
I had to take a copy of the original wp_query
$original_query = $wp_query;
then assign my custom loop to the global $wp_query
, and finally reset everything with
wp_reset_postdata();
$wp_query = $original_query;
In essence, this is what was missing:
function mytheme_template_redirect() {
if(is_singular('continent')) {
global $wp_query;
$page = (int)$wp_query->get('page');
if($page > 1) {
$query->set('page', 1);
$query->set('paged', $page);
}
remove_action('template_redirect', 'redirect_canonical');
}
}
Called with:
add_action('template_redirect', 'mytheme_template_redirect', 0);
Everything works fine now as I’m no longer getting a 301 redirect when appending /page/2
to the (single) custom post URL