Add CSS to the WP Theme Customizer toolbar
-
Hello I have added a
<div>
as an option to the WP Theme Customizer toolbar, I intend this to show different CSS background options using the cssbackground-image: -webkit-gradient
rendering however I have found no way to add the CSS, theadd_action( 'wp_head')
does not seem to allow update to the toolbar.The code below works and ads a
<div>
to the background color tab but this is as far as I have got.Please help.
function mytheme_customize_register( $wp_customize ) { class Example_Customize_Textarea_Control extends WP_Customize_Control { public $type = 'textarea'; public function render_content() { ?> <div id="css1">xx</div> <?php } } $wp_customize->add_setting( 'textarea' ); $wp_customize->add_control( new Example_Customize_Textarea_Control( $wp_customize, 'textarea', array( 'label' => 'Textarea', 'section' => 'colors', 'settings' => 'textarea' ) ) ) }
- The topic ‘Add CSS to the WP Theme Customizer toolbar’ is closed to new replies.