ThemeShaper Forums » Thematic


what to include to make "get_option" work?

(3 posts)
  • Started 11 years ago by dxjones
  • Latest reply from jpound
  • This topic is not resolved
  1. I am working on a Thematic child theme.

    I have created some custom options for my child theme (that can be changed by the user, like the Thematic options). It is working fine when I call "get_option()" in any php code called when Wordpress is rendering a blog page.

    I also want to get the value of these options in my "custom.css.php", which is used in place of "custom.css". The options are for things like: font, background colour, and so on.

    I am not sure what Wordpress php files I need to include to get "get_option()" to work.
    When I include "../../../wp-includes/functions.php", I get an error that "apply_filters()" is not defined. I am not sure what is the minimum set of files I should include to make "get_option" work.

    Any suggestions would be appreciated.

    -- David

    Posted 11 years ago #
  2. Hi David,

    take a look at Devin's excellent article: Dynamic CSS Stylesheets and Thematic


    Posted 11 years ago #

  3. define('WP_USE_THEMES', false);

    AFTER the header is loaded, make sure to set the content type to css:


    Posted 11 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.