I am a little bit of a newbie at WordPress theme development, and I can’t find the answer here or through much Google foo, so I wanted to find out if this scenario is possible.
I’m writing a child theme for Themetatic and I wanted to provide end users with the ability to change CSS color values and font family from a dialoge box in the theme controls. Does this require storing their entries in the database or can I just store these directly in the CSS file?
No, you will need to create a theme_option that WP will store in the database and an interface for the user to edit these options.
There is a great tutorial on how to do all of this here.
No you don’t need to store them in the database. you can do something like this:
html:
and put the following in the header.php
The way I would go about doing this would be by creating a Dynamic CSS file after the color/font values have been changed. Your CSS file would then be re-created to include these changed values.