different colors on post title (2 posts)

  1. nelius
    Posted 11 years ago #


    I have a blog with two authors... and I would like the post titles that I've made to be one color and the other in another color.

    Is this doable..and how?

  2. Kafkaesqui

    Posted 11 years ago #

    One way would be to use the_author_ID() or the_author_nickname() template tag to create css classes for each author.

    So for example, in the h3 tag used by the default version of The Loop in the index.php template, you could change:

    <h3 class="storytitle"


    <h3 class="storytitle_<?php the_author_ID(); ?>"

    Then just set up different class properties for each author (.storytitle_1, .storytitle_2, etc.) in wp-layout.css.

    Note: the_author_nickname() would probably make it more obvious who a css class belonged to.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.