I wrote a simple plugin which sets some css code using wp_options. It all looks similar like this:
add_action('init','easy_style');
function easy_style()
{
?>
<style>
#header a {
color: <?php echo get_option('topcolor'); ?>;
font-size: <?php echo get_option('topsize'); ?>px;
<?php
if (get_option('topstyle') == "bold")
{ echo "font-weight: bold;"; echo "font-style: normal;"; }
elseif (get_option('topstyle') == "italic")
{ echo "font-style: italic;"; echo "font-weight: normal;"; }
elseif (get_option('topstyle') == "bolditalic")
{ echo "font-weight: bold;"; echo "font-style: italic;"; }
else { echo "font-weight: normal;"; echo "font-style: normal;"; }
?>;
}
</style>
<?php
}
Now this works, but if I activate my "Contact Form 7" plugin, the contact form 7 doesn't work anymore. It can't send any mails. So I think what I do is wrong. If I remove this piece of code, the contact form works again...
I think I do it wrong because the css needs to be loaded in the header, no? So what I thought I would do as a test is put the same code in the header. However then some other css (i don't know where) overwrites these, so this also doesn't work.
I think there are some wp functions to add css code to the header but I don't know how exacly.
Any ideas?
Thanks