Forums

Writing custom CSS to an external style sheet based on theme options (1 post)

  1. sjthomas
    Member
    Posted 7 months ago #

    Hi,
    I've added some options to a theme I'm writing allowing the user to specify various different colours for various different elements. I'm looking for a way to write these to an external stylesheet as opposed to hooking into the header and loading them in the head in style tags on each page (for obvious reasons). I've done something similar before using a style.php file that sets the header to text/css and linking to it, but that requires including the wp-config.php file which can't be relied on any longer.

    Is there any way to achieve this style / content separation for these options? I've seen other themes use completely seperate stylesheets depending on the user options, but the options I've added/want to add are too granular for that to work.

    Any help is much appreciated.

Reply

You must log in to post.

About this Topic