WordPress.org

Ready to get started?Download WordPress

Forums

Hatch: Show category description (3 posts)

  1. sidblunt
    Member
    Posted 2 years ago #

    I'm building a site offline (using MAMP) with the Hatch theme.
    I'd like to use category pages and am trying to find a way to get the category description to appear above the post thumbnails on the category index page (i.e. site/category/xxxx)

    I've found the command <?php echo category_description( $category_id ); ?> on the wordpress reference site but I can't work out where to put this, and on which page template to make it work.

    Any bright ideas?

  2. egado
    Member
    Posted 2 years ago #

    Hi sidblunt,

    try this in your archive.php right after <div id="content">

    <?php if (is_category() && category_description() != null ){ ?>
      <div id="category discription">
        <?php echo category_description(); ?>
      </div>
    <?php } ?>

    Let me know if it helps... :)

  3. sidblunt
    Member
    Posted 2 years ago #

    Hi egado,

    Just got round to trying this out and it does exactly what I wanted it to do. Thanks for taking the time to help! :)

Topic Closed

This topic has been closed to new replies.

About this Topic