Getting category name on category page

get cat name() : Retrieve the name of a category from its ID.

Usage

<?php 
    get_cat_name( $cat_id ) 
?> 

Example (On category.php page)

<?php
    // cat is by default category id on category.php page, no need to define this in previous lines
    echo get_cat_name($cat); 
?> 
Share

You may also like...