• Hi Folks,

    I’m the maintainer of the WuCoco theme and I’m interested in using php within my stylesheet to enable a very flexible options page. I’ve used functions.php to setup a skeleton options page, but if I try to import functions.php into style.php (to get access to the variables and functions I’ve set up) I get a blank stylesheet and an error in my apache error_log that there is a call to an undefined function (get_settings which is a standard, though deprecated WP function). Figuring that the problem was that style.php is being called outside of the standard template environment, I started digging and found that if I require wp_config.php things start behaving normally.

    This is the result of a lot of supposition and guesswork and I’d like to confirm that there isn’t a smarter way to get access to the standard function/variable environment that the rest of the template files see from within my style.php file, or am I doing the right thing by calling wp-config.php?

    Thanks,
    Mike

  • The topic ‘style.php and getting access to the standard “theme environment”’ is closed to new replies.