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
- WordPress 6.4.2 – can’t load editor style css using ‘after_setup_theme’ or ‘admin_init’ actions
- 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?
- Why I obtain different visualization when I run the website on my local machine and on remote server?
- Some doubts about WordPress handle the horizontal main menu visualization
- How to create a WP theme that use BootStrap? [closed]
- How To Display Value from Theme Options Field in Front End Template?
- Update Specific Key Value in Complex `wp_options` object
- Can’t change theme name
- my single.php is mixup on some post for no reason
- How to use the _S framework
- header, stylesheet not being read
- Creating an advanced searchform based on select boxes
- help needed for suit designing tool
- Tiny MCE custom styles, and preview in the backend
- How to format the first line of a post differently?
- Tabbed theme options query about add_settings_section callback function
- .current_page_ancestor broken in Twenty Eleven
- Why my theme option not working?
- How to set a custom URL for the iframe in the customize page
- WordPress custom menu can’t show 3. level submenu
- How to add wysiwyg editor in customize screen using customize_register
- Gallery functionality in custom theme
- WordPress Animation Adjustments
- How to register dynamic settings in WordPress Customizer?
- Is there a list of default generated Gutenberg block CSS? Unable to align video blocks
- Let user to upload multiple time
- style variations hurt the editing performance
- How to copy page/post from one theme to another?
- How to change listing type permlink?
- How to create a robust and logic class naming system in WordPress theme developing?
- Why nav_menu_css_class doesn’t work with apply_filters?
- How to enable admin to upload multiple images to support header carousel slider theme in WordPress?
- How do I change the color of individual page titles in WordPress?
- Removing element from DOM with jquery through plugin Custom Scripts for Customizer
- Why does wp_customizer default values do not apply when theme is installed for the first time?
- 3 Level Menu Navigation (3rd Level not displaying)
- How to dynamically set a background image with the customizer without putting the css as an inline-style
- Image cropping isn’t working correctly when using Offload Media
- Find the source file causing a Mixed Content warning
- WordPress Custom Theme : Theme Builder vs ACF vs Gutenberg
- Theme does not allow shortcodes
- How to reduce the vertical space above and below a ul list uniformly with one command?
- 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 Do I Create a WordPress Demo Site with Limited Admin Access
- Fatal error: Class WP_Customize_Image_Control not found
- What is difference between add_theme_support and Theme Customization API?
- Is there a way to add classes to a page when using a Gutenberg reusable block as page layout?
- (Parent) theme Is Not Showing In Theme Selection Panel and Therefore Breaks Child Theme
- How can I fix my theme header for my CSS stylesheet?
- How do I remove header/page-title image in farvis theme? [closed]
- How to show Custom Field Value in Woocommerce Shop Page
- How to display only the first two elements from ten same elements
- How to show some of category in wordpress
- using themename_the_custom_logo() in template-tags?
- Duplicate child theme incl. design changes
- Styling the website via the customizer – do the changes stay after theme update?
- Text View (Code View) in WordPress Customizer TinyMCE Editor
- Is there a way to create sections under “Colors” panel in the Theme Customizer?
- WordPress doesn’t load css, image and js files after moving local installation folder
- How to toggle WP Customizer Panel and Section with JavaScript API?
- How to generate a rtl.css file for themes?
- Debugging slow WordPress Theme Customizer (Any option similar to Query Monitor)?
- Import settings from another theme
- Load multiple css simultaneously using functions.php