Paginate_links only working on first page

I was actually dealing with this same issue earlier today. I compared the code I’d written for a site using paginate_links() a few weeks prior ( where it worked ) and the site I was working on today ( where it didn’t work ) and found the deal-breaker: when you associate the page number in either the base or format param with a url param, you have to define add_args in your arguments.

It can be as simple as assigning an empty array to add_args. The code below will work for you.

$page_links = paginate_links( array(
    'base'      => add_query_arg( 'pagenum', '%#%' ),
    'format'    => '',
    'prev_text' => __( '← Vorige', 'aag' ),
    'next_text' => __( 'Volgende →', 'aag' ),
    'total'     => $num_of_pages,
    'current'   => $pagenum,
    'add_args'  => array(),
) );