Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #5159

    hi there

    i have looked and looked and searched and searched the forum to no avail.

    categories have descriptions and i would like to show the category description on the archive and blog list pages (not single post) bu the archive.php

    any idea how to do this? (newscast theme)

    thanks

    Darren

    #49065

    Hey,

    you can use following code:

    <?php
    $category_description = category_description();
    if ( ! empty( $category_description ) )
    echo apply_filters( 'category_archive_meta', '<div class="category-archive-meta">' . $category_description . '</div>' );
    ?>

    for the category description. I.e. you can insert it in archive.php after:

    <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
    <?php _e('Blog Archives','newscast'); ?>
    <?php } ?></h2>

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘show category description on blog pages / archives’ is closed to new replies.