Support » Fixing WordPress » Showing category title in main content,

  • Hi there,
    On my older blog I always wanted to show what category I was viewing by having a heading for that category at the top of the main content of the page. I done this by using:

    <?php
    if ($cat)
    {echo “<h3>You are viewing the ” . get_the_category_by_ID($cat) . ” Category</h3>”;}
    ?>

    This no longer seems to work (when parsed nothing happens) and I have to say it was many months ago I used this. Do I now use a different tag to get this to work?
    Thanks
    Karl

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Showing category title in main content,’ is closed to new replies.