Yes, you’re correct that on the static front page, we use get_query_var('page')
to get the current page number.
And actually, the issue in question (“the number 2 isn’t highlighted“) happened because you used get_query_var('paged')
(note the paged
) with the current
arg for paginate_links()
, which means you’re passing the wrong number.
'current' => max(
1,
get_query_var('paged')
),
So all you need to do is replace that with 'current' => $paged,
and the problem will be gone.