simple.. give php the category of current post – but it dont work!
I am doing a dirty hack, and all I want is the category title to be passed to php on the single.php template.. Simple right?
So at top of single.php, I do:
<?php $current_category = single_cat_title("", false); echo "[" . $current_category . "]"; ?>
And it doesn’t work. Nor do any of the other ideas I had. help?!
- The topic ‘simple.. give php the category of current post – but it dont work!’ is closed to new replies.