[wp-hackers] Dynamic Style Sheets

Guy Leech guyleech at gmail.com
Sun Apr 29 05:32:01 GMT 2007


I've modified my WP installation to read off 'style.php' instead of '
style.css', but I can't access any of the WP functions or variables from '
style.php'. Does anyone have any brilliant ideas of what could be wrong, or
how to access these funcs/vars. Basically, I want to be able to generate my
stylesheet on-the-fly, not using inline styles; something like 'if(
is_single() { //make CSS }'.

I basically modified 'wp-includes/theme.php' so that whenever it looked for
'style.css' it also looked for 'style.php' and loaded that. The styling
itself works fine, jus when I try to call a WP function it crashes with
'Fatal Error: undefined function.".

Any help would be greatly appreciated
 - Guy


More information about the wp-hackers mailing list