WordPress   

Get list of all categories including their post count in WordPress

<div class="categories-list">
	<?php $categories = get_categories(); ?>
	<ul>
		<?php foreach($categories as $category) { ?>
		<li><a href="<?php echo get_category_link($category->term_id); ?>"><?php echo $category->name; ?> (<?php echo $category->count; ?>)</a></li>
		<?php } ?>
	</ul>
</div>
Need Professional Support for Your Website Problems?

Whether you're facing website issues or struggling with code implementation, our team is here to assist. Hire us to get your website back on track.

Hire Us