Different font colors on two category pages (5 posts)

  1. grniguana
    Posted 3 years ago #

    Is it possible to have the description/intro text to two different category pages in two different colors, e.g., black text on one of the pages and white on the other text page? If so, how can I go about doing this?

    fyi, I was able to place the category description as an intro to the posts on the pages by placing the following code in the category.php:

    <?php echo category_description(); ?>

  2. Andrew Nevins
    Forum moderator
    Posted 3 years ago #

    Are you making a custom theme?

  3. grniguana
    Posted 3 years ago #

    Nope - just working on a website for a friend.

  4. Andrew Nevins
    Forum moderator
    Posted 3 years ago #

    Look at CSS Color property and implementing it in either a Child Theme or Custom Style/CSS plugin.

  5. Michael
    Forum Moderator
    Posted 3 years ago #

    to have category specific formatting, you need to have a category specific css class in your site - possibly implemented with body_class() for the category archive pages, or with post_class() for individual posts.


Topic Closed

This topic has been closed to new replies.

About this Topic