pagination custom post type on CP page

I’ve found the problem. Since I’m on a single (custom) post page, WP redirects back to the root of the URL. I’ve found the solution here.

The solution (copied from the post on SO) was adding this to the functions.php:

add_filter('redirect_canonical','pif_disable_redirect_canonical');

function pif_disable_redirect_canonical($redirect_url) {
if( is_singular()) {
    $redirect_url = false;
}
return $redirect_url;
}

I’ve removed && in_category('PLACE CAT ID HERE') from the original code in the post to tailor to my situation.