creating a custom script that writes to the static CSS file is a bad idea!!!
you would need to regenerate the file each time you save any changes.
a better solution would be to save all options in an array of options say for example:
$MyCSS['background_color'] = #009988;
$MyCSS['background_repeat'] = no-repeat;
update_option('theme_settings',$MyCSS);
and that why you only call the “get_option()” function once.
$MyCSS = get_option('theme_settings');
// and use :
echo $MyCSS['background_color'];
and make much less calls to the database and use less resources if you are thinking performance wise.
Related Posts:
- How to mark an option as selected
- Passing dynamic options from backend to frontend
- How To Add New Option Types To Option Tree?
- How to use media upload on theme option page?
- How do I create my own admin button and theme settings page?
- Add a page outside of the current theme?
- Moving WordPress.com theme and widget settings to self-hosted site?
- Multisite: setting theme and options when a new blog is created
- Copying theme from Localhost to Live does not copy all theme settings with it?
- Register theme customizer settings when theme activates [duplicate]
- Switch Theme Through Options Panel
- How to make alert for new version on theme options?
- Add transparency to wordpress color picker?
- How can I show more than 15 themes at a time in the admin menu?
- How to go about pre generating css file with variables from theme options
- Is there a reliable way to keep track of how long a WordPress theme has been active?
- Does uninstalling a WordPress theme delete its database values?
- Cannot find the code for “Edit This” link in posts in a specific theme
- Defining different theme for Blog posts page
- Working with an Array inside Your Theme Options Array – Multiple Values
- How to set different settings for a mobile theme?
- Add a series of checkboxes to theme options
- Disable Theme API / Front end (for API only environment)
- What’s the proper way to include inlined javascript-source?
- How to understand a specific bit of WordPress syntax
- Should a child theme share the same theme options row as the parent, or should it have it’s own options row?
- What’s the order of loading wordpress elements?
- Creating a theme options page
- loss of theme options while site deployment in production
- Theme settings default, strange behavior before first save
- How Do I Use A Custom Mobile Theme?
- How to find out if page_for_posts is showing (in order to style menu item)
- New custom theme option (text input) giving index error
- How can I make some themes usable only by admins?
- Custom options below pages/posts editor?
- Redux callback action
- Full page (no WP admin menus and options) admin theme options
- Preserve theme settings when migrating from local to live
- Functions containing parameter ‘yourtheme’
- How to dynamically change theme’s slogan from admin?
- What is the “pub” theme? [closed]
- Problems to disable the comments for my statics pages
- Color Options from Theme Customizer API not returning via get_theme_mod()
- Issue with theme mod options during domain migration
- .PO file is found but I don’t see translations: how to debug the problem?
- How to add some php code in header.php using plugin
- WordPress activate theme error $pagenow
- Setting a new default template for the creation of a page
- WordPress setup one database with two different website?
- How to include stylesheet in custom admin using parent_slug
- Get data from Theme Options and use them into meta options field in custom post type
- Cannot update a file for my theme
- List of categories instead of dropdown menu selector in admin options
- What’s the easiest way of adding more options in the Theme Options of the twenty eleven theme?
- Switching among theme customizations
- How to implement theme option to change bootstrap 4 container from .container to .container-fluid
- how to create a section inside a section with theme options customizer
- Warning: call_user_func() expects parameter 1 to be a valid callback
- Can i add wordpress editor to my custom theme option? [closed]
- Create /archive page in WordPress Theme
- Theme Options Menu Item – Permission Issue
- Church hope them issue
- How to move the sidebar in TwentyFifteen to the right?
- Do Child-Themes automatically load the Translation from the Parent-Theme?
- reason of splitting theme files to multiple files
- Using chunk theme from wordpress.com on my own host
- What is the first file wordpress looks at in a theme?
- Duplicate and change a Theme Widget
- I want to run different WordPress websites under the same database
- get_template_directory_uri does not seem to work when defining WP_CONTENT_DIR
- Using a _GET gives me a debug error (over my head)
- Possible to put header-{your_custom_template}.php in subdirectory?
- Why wp_enqueue_style() not working?
- 404 Error while accessing the font files
- Child Style.css not overriding parent theme style located in assets/css/main.css
- qTranslate with my own theme and settings
- How do I change the scan depth for page template files?
- Moving test theme to live site without mySQL error – how? [closed]
- Apache errors when retrieving taxonomies
- Translation not working after editing plugin template
- Is it good practice moving the main stylesheets after the plugin styles?
- Issue on Checkbox with Custom Option Page
- Alignment Problem [closed]
- Unable to find translations in WordPress theme
- Using filter in the widget causes fatal error
- Theme title in admin shows full path [closed]
- Is there a way to see how a theme will look before buying it?
- Menu items do not “open” when mouse hover over them?
- display category name based on its equivalent id
- theme customizations gone after enabling ssl
- Simple filter to change label name of Email Adress to something else
- Changing theme folder name disrupts widgets
- WordPress Customazation API section in section
- Replacing current theme folder by previous version of the same folder produces “undefined function get_header()” error
- Does not work bookmarklet in the theme Tagology
- How do I block a subdirectory from WordPress theming?
- Adding a wp_head hook from an included PHP file
- Deleting Widgets in sidebar in Panthea theme
- Is it possible to dynamically show different themes for different users? [duplicate]
- How do I get rid of the Mindblown and the book recommendations?