Get Category Name in WordPress

Buy 1 Month, Get 2 Months Free. Coupon: 2MOFREE

This is another super simple and yet super helpful WordPress function that took me a while to find. I’m currently working on a WP Theme that requires me to show the category name. And I thought it isn’t right to write an SQL including all the necessary stuffs that comes with querying the database just to get the category name. There must be a simpler and better way… and there is! Here’s the simple code to do just that.


<?php get_cat_name( $cat_id ); ?>

Cool!

Reference: http://codex.wordpress.org/Function_Reference/get_cat_name

Incoming search terms:

  • get_category_name
  • wp get_category_name
  • get_category_name wordpress
  • get category name wordpress
  • wp get category title
  • wp get category name
  • wordpress sql category name
  • wordpress get the category title
  • the_category_name
  • get_category_title wordpress

No related posts.

Comments

  1. Arthritis Treatment  says:

    wordpress is the best blogging platform ever-.:

Speak Your Mind

*