• Seems I should see what category I’m in after clicking on a category. Preferably, if I click on a category named Pets, it should have a subheader line that displays “Pets”.
    No?
    Anyone know an easy way to make this happen?
    cheers
    Metalious

Viewing 4 replies - 1 through 4 (of 4 total)
  • put this code outside the wordpress loop, where you want the category name to appear:

    <?php
    if ($cat)
    {echo "<h2>Category: " . get_the_category_by_ID($cat) . "</h2>";}
    ?>

    Thread Starter metalious

    (@metalious)

    Thanks for the reply.
    I’m afraid I have no idea where to paste that code.
    I would like for the category name to appear directly below the header, logo etc..
    I’ll experiment with pasting it into the index.php somewhere unless someone tells me not to bother.
    Also, can I assume that I can replace the CSS style “h2” with any other style?

    Any luck with this metalious?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Display category name within category’ is closed to new replies.