are you selling christmas candy? or barber poles? lol
wordpress has filter hooks to influence the output of some of its functions.
https://codex.www.ads-software.com/Plugin_API/Filter_Reference
snippet how to use this on the title of posts/pages
(this needs to be added to functions.php of your theme:
add_filter('the_title','colorize_title');
function colorize_title($out) {
// if(in_the_loop()) : //optional to restrict the effect to some ares
// see: https://codex.www.ads-software.com/Conditional_Tags ;
$bits = explode(' ',$out);
$i = 0;
foreach($bits as $bit) {
$bits[$i] = '<span class="bit-'.$i.'">'.$bits[$i].'</span>';
$i++;
}
$out = implode(' ',$bits);
// endif; // closes the optional if statement
return $out;
}
this wraps each word of a post/page title into a span with a css class .bit-0
, .bit-1
, and so on
styling in style.css (styling the hover state is optional, but fun):
span.bit-0 { color: #f00; }
a:hover span.bit-0 { color: #fff; }
span.bit-1 { color: #fff; }
a:hover span.bit-1 { color: #f00; }
and so on.