• When I use the function single_cat_title() inside the single.php template, it returns a null value. I’m using this to include a php code relative to post category.

    It’s like this:

    <?php
    $categoria = single_cat_title(”,false);
    $categoria_out = dirify($categoria);
    ?>

    This code work perfectly in category template, but in single post template I have this problem – single_cat_title() returns a null value.

    How I can display the category name in single.php template outside The Loop?

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Need help category title in single post template’ is closed to new replies.