this is a bit challenging for me: I am using the great Advanced Custom Field plugin on my site to create different color scheme to each of my taxonomy.
I created a field called taxonomy_color and echoed out the color like so:
<h4 style="color: <?php the_field('taxonomy_color', 'magazine_'. $tax_term->term_id); ?>;">Hello</h4>
* magazine_ is the name of my taxonomy.
This is fairly easy and it works perfectly, however, everything becomes more complex when I want to change my hover and active class too.
since changing the hover and/or active state requires a reference to the stylesheet I was thinking about creating a dynamic stylesheet called: style.php and trying to pass the custom field onto that stylesheet and using this method will allow me to control the hover and active states too.
this is the code I generated for my style.php:
<?php
header("Content-type: text/css; charset: UTF-8");
?>
.slider-mag-template .bottom .nav li.activeSlide a,.slider-mag-template .bottom .nav li a:hover { color: <?php the_field('taxonomy_color', 'magazine_'. $tax_term->term_id); ?>;}
I can see in the site that the page is connected to my dynamic style.php but it doesn't read the field taxonomy_color from there.
can anyone suggest? even using a different method?
Thanks a lot