Dapatkan Cat Php WP Pertama

<?php
$category = get_the_category(); 
echo $category[0]->cat_name;
Andrew Lautenbach