Also, this code is working fine on a standard “page” template, just not on the single-wolf.php template.
Paging does not work in a single template page. Single pages use the <!--next page-->
tag to use paging.
The global variables used are different. The global variable $page
is used in a single post (or page) to do paging instead of $paged
which is used with other pages.
The next and previous link functions rely on the $paged
global variable. Sometimes you can trick WordPress by setting $paged
to the value of $page
:
$paged = $page;
Place it above this line:
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
EDIT:
You may also need to change the query variable here:
'paged' => $paged
TO:
'page' => $paged