WordPress.org

Ready to get started?Download WordPress

Forums

Different font colors on two category pages (5 posts)

  1. grniguana
    Member
    Posted 1 year 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
    Barrel Rider, Spam Zapper & Volunteer Moderator
    Posted 1 year ago #

    Are you making a custom theme?

  3. grniguana
    Member
    Posted 1 year ago #

    Nope - just working on a website for a friend.

  4. Andrew Nevins
    Barrel Rider, Spam Zapper & Volunteer Moderator
    Posted 1 year ago #

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

  5. alchymyth
    The Sweeper & Moderator
    Posted 1 year 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.

    http://codex.wordpress.org/Function_Reference/body_class
    http://codex.wordpress.org/Function_Reference/post_class

Topic Closed

This topic has been closed to new replies.

About this Topic