• Hannah S.L.

    (@fernashes)


    Automattic Happiness Engineer

    Hey all… question. I need to get a hold of the name of the category of each post but I can’t figure out how.

    $cat=the_category();
    The line above always causes the category name to be printed… $cat is NOT filled.

    Proof of that is this line:
    echo $cat.’blkaat’;

    $cat isn’t printed, but that nonesense is.

    Can somebody give me a hand with what exactly “the_category()” function is doing?

Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘PHP Struggles’ is closed to new replies.