Link to home
Start Free TrialLog in
Avatar of SiriusPhil
SiriusPhil

asked on

Outputting Just The Category Name Using Exisiting Function

I'm new to PHP (from ColdFusion) and am looking to output JUST the Category within a modified template design.  Is there a function I can use to do that?  the_category() returns the category name with the built in link to the catgeory.  I just need the category name outputted.

If there is no function, can someone help me write one?

500 points to the person who can help me learn a little about PHP and WordPress.

Thanks.

Phil
Avatar of SiriusPhil
SiriusPhil

ASKER

By The Way... I'm running WordPress 2.1.
ASKER CERTIFIED SOLUTION
Avatar of Member_2_3684445
Member_2_3684445
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ps the get_the_catagory(); function is the following

function get_the_category($id = false) {
global $post, $category_cache, $blog_id;

      $id = (int) $id;
      if ( !$id )
            $id = (int) $post->ID;

      if ( !isset($category_cache[$blog_id][$id]) )
            update_post_category_cache($id);

      $categories = $category_cache[$blog_id][$id];

      if ( !empty($categories) )
            sort($categories);
      else
            $categories = array();

      return $categories;
}

-Regards,