• show both the subcategory and the category, like Mouse–Food, this shows both the parent and child category. Instead, my website shows just Food.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Might want to look at Template_Tags/get_category_parents.

    Thread Starter kelp

    (@kelp)

    Thanks very much!

    Thread Starter kelp

    (@kelp)

    I’m having some troubles with this. Here’s the code I’m using:

    <div class=”post-date”><?php the_time(‘F jS, Y’) ?> in <?php echo(get_category_parents($cat, TRUE, ‘ » ‘)); ?></div>

    Here’s what displays in the source code:

    <div class=”post-date”>January 31st, 2007 in » </div>

    It basically just comes up with a >>, and that’s all. Did I input the code wrong?

    My template does not show the category at each post. Is there a way to make that happen?

    (If so, I would need step by step directions, because I am a novice to all of this…)
    Thanks!!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘When displaying the category of a post, how would I…’ is closed to new replies.