I’m pretty sure there is an example in the Options Framework sample theme on how to create a color field. How you use the option data in your theme is a different matter. You can print CSS in the header via wp_head
hook and use PHP that way. I’m relatively certain this is shown in the sample too.
function wpa_138251(){
$color = of_get_option('some_color', '#CCCCCC' ); ?>
<style type="text/css">
.some-class { background: <?php echo $color; ?>; }
</style>
<?php
}
add_action('wp_head','wpa138251');
Related Posts:
- How to disable wordpress from overload my stylesheet styles with customizer styles
- Is it possible ( or advisable) to allow open access to the new theme customizer for potential clients?
- Add a dropdown to theme customizer
- Understanding wp_add_inline_style
- Editing the custom background CSS
- Add a preview to a WordPress Control Panel
- WordPress Customizer Typography: How to load just the unique Google Fonts?
- How to remove menus section from WordPress theme customizer
- Modify the Additional CSS section (adding a disclaimer)
- How to hook CSS file according to theme selection in the customizer section
- How Can I Create a List of Values to Be Iterated Through via WordPress Customization API?
- Change setting name in Customizer and keep the data
- after_setup_theme, Global Variable and Theme Customizer
- get_option in header.php not returning value from customizer
- Internal error 500 accessing Theme > Customize
- Using an if statement in the theme customizer page
- How to add styles set by user in the customizer
- Following Web Performance Optimization techniques to output static and dynamic css
- How to enqueue javascript for WP Customize options sidebar?
- What is the meaning of WordPress’s recommended css classes and where are they applied?
- Change WordPress header color using customizer
- How do I use a color from theme options?
- Alignment Problem [closed]
- WP Customazation API doesn’t save the default Value
- Related Post Category Filter
- In wordpress customizer div still showing even if I hid it with javascript
- Customizer API Multi Sections in single Panel
- Default customizer colors aren’t displayed outside of the preview
- How to customize the colors within a stylesheet using a WordPress setting
- How to fix an issue with customizer live preview?
- Customizer_register theme options not saving
- WordPress Customization API overwrite LESS variable
- Using Customizer value in an external PHP file inside a theme
- “No Data Received” error in Chrome every time i try to update the theme functions file
- trying to figure out how to use more that one image upload in the same section in theme customizer
- How to show associated fields if checkbox is checked in customize widget screen using wp_customize?
- How To extend WP_Customize_Control
- How to add CSS class to custom logo?
- Solutions for generating dynamic javascript / CSS
- WordPress Settings API error
- Theme Customizer : how to create multiple-level panel
- Customizer Active Callback not working
- How to execute conditional script when on new customize.php (Theme Customize) screen
- How to set the default value of a option in a theme?
- why does twenty eleven theme mix up the css measurement units?
- Adding inline styles from a widget
- Can’t edit style.css in subdirectory of my theme?
- Adding dashicon fonts to the admin of pre 3.8 installs
- How to Handle CSS for Multiple Header header.php Files?
- “Display Site Title and Tagline” checkbox not working?
- How to set page template on front using starter content?
- WordPress 5.8 update problem custom theme styles are overridden by core styles common.min.css
- Is it necessary to prefix every css class in a theme framework?
- Weekly background code not working
- How can i add edit shortcut icon in wordpress customizer without using selective refresh?
- Add new panel inside parent panel in WP Customize?
- Unable to pass variable on theme cusomizer add_settings()
- Multiple Page Templates & CSS
- How to add field customizable by the theme editor to your theme?
- Font Awesome 5 Free – far working but fas is not? [closed]
- Q: How to pull data from custom table to populate zustomizer setting/control select options
- How to get javascript slider to work! [closed]
- The ‘default’ attribute from $wp_customize->add_setting() method not in db?
- Override customizer values on a per-menu base
- Is it possible to save more than one image to an option?
- correct tags for validating input types
- Efficiency of wp_options vs a new table
- How to rotate every letter in a title
- Why in the static pages of my theme are showing these information?
- Can I make a Customizer dropdown-pages list include private pages?
- How to style bootstrap container in wordpress theme?
- How do I merge 2 WordPress Themes?
- Customizer: get_preview_url() inside customize_save_after hook
- Place title (in correct place) above image with opaque background [closed]
- CSS preprocessor file messed up after compiled
- How to get DB options format without saving? [closed]
- Why I obtain different visualization when I run the website on my local machine and on remote server?
- How to use the _S framework
- style variations hurt the editing performance
- Why nav_menu_css_class doesn’t work with apply_filters?
- Theme does not allow shortcodes
- fetch all post from wp multisite network and sort all the post in descending order on the basis of “Created by ” term
- What is an alternative to not using child theme to customize a WordPress theme?
- How to generate a rtl.css file for themes?
- Import settings from another theme
- Load multiple css simultaneously using functions.php
- Nav menus Fast previewing not working with wp_get_nav_menu_items!
- Load get_page_templates into select menu
- Missing hashtag with theme customizer header color
- Create new sidebars trough admin post/page metabox
- Theme Options Doesn’t Work On WP Multisite
- WordPress two sidebar layout or theme
- Theme Option’s Save Button is not working
- adding navigation to genesis themes
- Alternating CSS classes for dynamic content [closed]
- Header is not showing full width
- How to resize video lightbox popup in wordpress? [closed]
- How can I get rid of the distance when I’m using list-style-type: none? [closed]
- HTML to WORDPRESS [closed]
- WordPress search field won’t get wider