Support » Themes and Templates » 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 css background-image: -webkit-gradient rendering however I have found no way to add the CSS, the add_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>
    	$wp_customize->add_setting( 'textarea' );
    		new Example_Customize_Textarea_Control(
    				'label' => 'Textarea',
    				'section' => 'colors',
    				'settings' => 'textarea'
  • The topic ‘Add CSS to the WP Theme Customizer toolbar’ is closed to new replies.