Wordpress - Category title and description in template


/ Published in: PHP



Copy this code and paste it in your HTML
  1. <?php $category = get_the_category(); echo $category[0]->cat_name;?>
  2. <?php $category = get_the_category(); echo $category[0]->category_description; ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.