Do you mean each word with a different color?
Thread Starter
canu
(@canu)
I would like to have 2 different colours
possibly not automatic – you would need to locate the code in header.php, and hard-code the site title with the individual words wrapped in spans with some css classes to allow the color formatting in style.css;
or semi-automatic – separate the words of the site title, and automatically wrap them into spans.
example:
instead of (assumed):
<?php bloginfo('name'); ?>
use:
<?php $site_title_words = explode( ' ', get_bloginfo('name') );
$i = 1;
foreach( $site_title_words as $word ) {
echo '<span class="site-title-word-'.$i++.'">'.$word.'</span> ';
} ?>
the rest is formatting of the .site-title-word-1 { ... }
etc styles.
what theme are you using?
Thread Starter
canu
(@canu)
Sorry for the delay, I’m using the Twenty Eleven theme
alchymyth, this is exactly what I was looking for. You advice is spot-on right. It worked perfectly.
Thanks!