WordPress.org

Forums

echo() function question; seems to be ignoring CSS (1 post)

  1. dermotmcguire
    Member
    Posted 4 years ago #

    Hi,

    I'm currently editing my archive.php file in order to provide a little more information and context when users visit the archives for various categories.

    At the moment I'm using this:

    <?php /* If this is a category archive */ if (is_category()) { ?><h2 class="fancy"><?php single_cat_title('An archive for posts about '); ?></h2><h2 class="fancy"><?php echo category_description(); ?></h2>

    to display information on each category archive page.

    Now, the single_cat_title function produces text that is properly shaped by the "h2.fancy" class, but the echo category_description function doesn't. Instead it creates a <p> inside that class that ignores all styling rules.

    I'm not sure why this is happening, and am wondering if this is something inherit about the way the echo category_description function is treated by CSS, either way any and all help would be really appreciated.

Topic Closed

This topic has been closed to new replies.

About this Topic