I was trying to dig into this deeper, but I couldn’t find any useful ways/hooks to add a little disclaimer above the Additional CSS code editor in the WordPress Customizer. If anyone has a starting point of how i can add something simple like that, it would be greatly appreciated.

The section I am talking about is wp-admin > Appearance > Customize > Additonal CSS

We basically want to add a disclaimer to our clients about using that section, and I wanted to do it the WordPress way, and not hack anything using jQuery (to add it) or in core.

2 Answers
2

Yep. I was able to show it by default using:

<?php
add_action('customize_controls_print_styles', function()  {
?>
    <style id="custom-css">
        #sub-accordion-section-custom_css .description {
            display: block !important;
        }
    </style>
<?php
});

Thanks for your help!

Leave a Reply

Your email address will not be published. Required fields are marked *