Hey Blogger and codder, if you are creating a custom WordPress theme and want to create a Popular WordPress category widget without using third party plugin, then this article for you, you can use this piece of into the custom theme and display popular category widget in WordPress for the blog post. Because it’s the best practice to use small pieces of code and display widget in WordPress. because to use a lot of plugin for WordPress it takes more time to load and website getting slower day by day when we use a plugin for small changes.
So if you have a little bit of WordPress coding knowledge then follow these tips and put these code in the sidebar and display the most popular category in the sidebar.
How To Display Popular Category Widget in WordPress
1. Open sidebar.php of your custom theme and open
2. Place this code out there, now popular category would display
<section class="widget widget_categories">
<div class="heading text-left mb-10">
<h2><span class="orange">Populr </span> Categories</h2>
<?php wp_list_categories('number=10&show_count=1&orderby=count&order=DESC&title_li=') ?>
3. You can change the limit 10-15 and many as per your requirement.
“If you have any doubt related custom theme development, please drop me a comment I would try to solve your problem as soon as we can”