How to Get the Category Title/Name


Using the below code get the category name

 <?php echo get_cat_name(category ID here) ?>

Example:

<?php query_posts("cat=3");?>
<?php echo get_cat_name(3);?>
<?php while(have_posts()): the_post();?>
<?php the_content();?>
<?php endwhile;?>
Advertisements