WordPress.org

Support

Support » How-To and Troubleshooting » is this bug ..get_the_category !!

is this bug ..get_the_category !!

  • Hi ..

    I would like to get some categories name by id … so I wrote this ..

    <? $cName = get_the_category(’25’); $TheName= $cName[0]->cat_name; ?>

    Works fine … But its not showing the category 25 name … why … in the admin cetagory manager the wanted category id I want is 22 … but I must called with id 5 !

Viewing 1 replies (of 1 total)
  • <?php $cName = get_the_category(’25’); $TheName= $cName[0]->cat_name; ?>

    “><?=$TheName?>

    to get the cetagory name : get_the_category(’25’)
    to get the link : get_category_link(23)

    How .. is this bug ?!

Viewing 1 replies (of 1 total)
  • The topic ‘is this bug ..get_the_category !!’ is closed to new replies.
Skip to toolbar