Support » Fixing WordPress » single_cat_title() problem in single.php

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

    It’s like this:

    $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.

    Sorry my english isn’t very good. And tks…

Viewing 1 replies (of 1 total)
  • Well… I’ll change the question. How I can display the category name in single.php template outside The Loop?

    Because the single_cat_title() doesn’t work in single.php template. Anyone can help me? Please?

Viewing 1 replies (of 1 total)
  • The topic ‘single_cat_title() problem in single.php’ is closed to new replies.