this code you shared with me worked great for regions and cities, can it be modified to show categories.
<div id="home-regs">
<h2><?php _e('All locations', 'sigma'); ?></h2>
<div class="wrap">
<?php $cities = CityStats::newInstance()->listCities('%%%%', '>', 'i_num_items DESC'); ?>
<?php $i = 1; ?>
<?php foreach($cities as $c) { ?>
<?php if($i <= 20) { ?>
<div><a href="<?php echo osc_search_url(array('page' => 'search', 'sCity' => $c['city_id']));?>"><i class="fas fa-location-arrow"></i> <span><?php echo $c['city_name']; ?></span> <em>(<?php echo $c['items']; ?>)</em></a></div>
<?php $i++; ?>
<?php } ?>
<?php } ?>
</div>
</div>