WordPress.org

Ready to get started?Download WordPress

Forums

Display each category name with a special colour on the header (2 posts)

  1. delfatwork@yahoo.fr
    Member
    Posted 4 years ago #

    Hello,

    I am writing for the first time on this website but I am using it almost every day. Thanks to everybody for this good sharing.

    There is my concern:
    I have created an header which display category name /or page title, depend on the context.
    I would like to stylise each category with one colour
    Is someone have an idea to how to proceed?

    This is my website and the code is under:
    <?php bloginfo('name'); ?><span style="color:#8BC53F;text-transform: uppercase;font-weight:normal;"><?php single_cat_title(); ?><?php if (is_single()){the_category(', '); }?></span><span style="color:#0071BC;text-transform: uppercase;font-weight:normal;"><?php if (is_page()){the_title(); }?></span>

    Thanks very much

  2. delfatwork@yahoo.fr
    Member
    Posted 4 years ago #

    Please, Is anyone have an idea? I have looked on many website and I can't find the solution.

Topic Closed

This topic has been closed to new replies.

About this Topic