Support » Fixing WordPress » How to add a text header when selecting a category?

  • Resolved tolpol

    (@tolpol)


    I’ve got a travelblog, with a category assigned to every past voyage – this way you can click on any of the categories and see all posts I made during that particular trip.

    What I’d like to have is a short description of the trip showing up as a first undated block of text, on top of the listed posts – I don’t seem to work out how to do this. Is it possible to do something like this? Maybe a plug-in?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Categories have a description field (Manage -> Categories -> Click any existing category -> Update the Description field)

    In your template(s) add
    <?php echo category_description(); ?>
    to display the description.

    I must say this is untested, as I use it myself with a few selected categories:

    <?php echo category_description($catid); ?>

    That seems to do the trick – thanks !

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to add a text header when selecting a category?’ is closed to new replies.