Deborah Buck
asked 10 years ago

I have a category page that needs some introduction. Example:
http://fivetwo.crosspointdesigns.com/wikitracks/sacramental-entr/
I found an article that helps me edit the category description, which includes tips on how to set the category description to actually display (since it does not with the DW Focus theme).
http://premium.wpmudev.org/blog/cool-wordpress-category-pages
Their tips didn’t work. I saved category.php to my child-theme folder with the edits suggested, and still my category description is not displaying. Is there another file that is determining how these category pages are being displayed?
I appreciate the help!
This is the code I inserted into my child theme’s category.php page just below the closing h1 tag.

<!– Code inserted to display category description–>
<?php if (!is_paged()) {?>
<?php if ( category_description() ) : // Show an optional category description ?>
<div class=”archive-meta”><?php echo category_description(); ?></div>
<?php endif; ?>
<?php }?>
<!– end inserted code for category descriptions –>

1 Answers
DominicStaff
answered 10 years ago

To resolve this issue, you can  open the category.php file, then add the following code under line 21.

<div class="category-description"><?php echo category_description(); ?> </div>

Also, to change the style for the  category description, you can add the following code to the style.css file:

.category-description {
    border: 1px dashed rgb(0, 0, 0);
    color: rgb(204, 204, 204);
    margin: 7px 0 0;
    padding: 10px;
}

Hope this helps !

Powered by DW Question & Answer Pro