Viewing 1 replies (of 1 total)
  • Plugin Author Darren Cooney

    (@dcooney)

    Hi,
    I’ve never tested this so Im not sure how this would work but what have you tried?

    Have you tried the following?

    $cats = get_the_category();
    $cat_name = $cats[0]->name;

    or

    $cats = get_the_category();
    foreach( $cats as $cat ){
      $cat_name .= $cat -> cat_name;
    }
    echo $cat_name;

    Cheers,

Viewing 1 replies (of 1 total)
  • The topic ‘Display category name in template’ is closed to new replies.