[wp-hackers] Dynamic Style Sheets

Guy Leech guyleech at gmail.com
Sun Apr 29 05:54:53 GMT 2007

I simply modified the get_themes() function to include 'stlye.php' or '
style.css'. Since the time of writing I've realised that I need to include
'wp-blog-header', and now everything is working fine and dandy. Though I'm
still having trouble figuring out if the page I'm on is a single page, as
the stylesheet can be called from anywhere. I'm sure I'll work something

Thanks for the help
 - Guy

On 4/29/07, uberdose <wordpress at uberdose.com> wrote:
> How did you load it? You need someting like include or require ...
> On 4/29/07, Guy Leech <guyleech at gmail.com> wrote:
> > 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