WordPress.org

Ready to get started?Download WordPress

Forums

is this bug ..get_the_category !! (2 posts)

  1. mavico
    Member
    Posted 7 years ago #

    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 !

  2. mavico
    Member
    Posted 7 years ago #

    <?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 ?!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.