Support » Fixing WordPress » echo() function question; seems to be ignoring CSS

  • 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.

  • The topic ‘echo() function question; seems to be ignoring CSS’ is closed to new replies.