This is the situation. When viewing post (let say it is published in 5 categories) on my homepage (index.php) I want viewer to see only one (or two) category in which post has been published. It should look something like this:
My Post Title
Category 1, Category 2,...
Thanks,
B
<?php
$category = get_the_category();
echo $category[0]->cat_name;
?>
from
http://codex.wordpress.org/Template_Tags/get_the_category
Thanks a lot Dsader... huh... dumb... I guess I could have search for it myself. Do You have any Chinese saying that could help me survive:)
Cheers
How about from the Bhagavad Gita, instead?
“As the blazing fire reduces wood to ashes, similarly, the fire of Self-knowledge reduces all Karma to ashes.”
Thanks:) I'll quote Chris from "Everybody hates Chris" (with a little change):
"Dsader has some kind of power to make me feel as the smartest idiot in the world"
I think that original goes something like; "My mother has some kind of power..."
Cheers!