I want to display an archive page with pagination that lists all the categories on my site, and each link goes to that particular category archive page. So this would be like an archive page of category archives.
Each category on my site has a custom thumbnail created manually to match the category's permalink. I already have a layout setup to display all the categories but I'm doing this with a custom page template, so there's no pagination. This means all categories display on a single page which is a tad annoying(I have 100+ categories).
My current archive is setup with a specific custom page template name page-catlist.php
but I'm willing to change this to any other type of template file.
Here's the current code I'm using to output all categories on one page:
$args = array(
'orderby' => 'name',
'order' => 'ASC'
);
$cats = get_categories( $args );
$thm_pre = 'http://example.com/images/thumbs/';
$thm_end = '.png';
foreach($cats as $cat) {
$thumbnail = $thm_pre.$cat->slug.$thm_end;
// output the loop HTML here
// basically a list of category names & thumbs
// all linked to the cat URL by get_category_link()
}
I'm hoping there's a better way to do this so that I can add natural pagination, ideally with WP-PageNavi. Any help would be greatly appreciated!