How get category title anywhere in your wordpress website?

Hello Everyone!
If you want to retrieve the name of a category from its ID, then just use my code anywhere in your theme files where you want to show the category title.

<?php 
echo get_cat_name(1); //here 1 is the cat id
?> 

Enjoy Code! and share my blog with your friends.

One Reply to “How get category title anywhere in your wordpress website?”

Leave a Reply

Your email address will not be published. Required fields are marked *