I am using SMOF options to control variables in the backend. As it is just now I have the css options being generated in the header file and they work, however I wish to add them to a style.php.
I have set this up however the variable data is not being displayed and the css options are empty.i.e
.site-header, .header-bar {
background-image:URL('');
I presume it is the global $data;
call that is incorrect. How would I fix this?
Style.php
/* Body Styling */
body {
background:<?php global $data; echo $data['body_background'];?>;
background-image:url(<?php global $data; echo $data['body_background_background']; ?>);
background-repeat:repeat;
}
a {
color:<?php global $data; echo $data['link_color'];?>;
}
a:hover {
color:<?php global $data; echo $data['link_color_hover'];?>;
}
html,body {
font-family:<?php global $data; $arraytype = $data['typography_body']; $stringtype=implode(",",$arraytype); echo $stringtype;?>;
color:<?php global $data; echo $data['font_color_select'];?>;
font-size:<?php global $data; echo $data['font_size_select'];?>;
}
h1,h2,h3,h4 {
font-family:<?php global $data; $arrayheading = $data['typography_h1']; $stringheading=implode(",",$arrayheading); echo $stringheading; ?>
}
/* General Styling */
.singlebutton,.tags-button a,.contactbutton input,#commentsubmit,.btn-standard-blog,.search-submit {
background-color:<?php global $data; echo $data['button_color_select'];?>;
color:<?php global $data; echo $data['button_color_text'];?>;
}
.singlebutton:hover,.tags-button a:hover,.contactbutton input:hover,#commentsubmit:hover,.btn-standard-blog:hover,.search-submit:hover {
background-color:<?php global $data; echo $data['button_color_hover'];?>;
color:<?php global $data; echo $data['button_color_text'];?>;
}
FUNCTIONS.php
...
wp_enqueue_style( 'albaband-dynam-css', get_template_directory_uri() . '/includes/css/style.php' );
...