• The function easy_testimonials_setup_custom_css() outputs inline style blocks with the options easy_t_custom_css, easy_t_custom_tablet_css and easy_t_custom_phone_css even when those options are empty.

    Please check that the options contain some styles and only output the respective HTML when they do.

    It’s also good to provide filters for the output.

    • This topic was modified 3 years, 1 month ago by Gal Baras.
Viewing 1 replies (of 1 total)
  • Thread Starter Gal Baras

    (@galbaras)

    If anyone’s interested, this code removes those empty blocks when added to your (child) theme’s functions.php:

    add_action( 'after_setup_theme', 'child_theme_setup' );
    function child_theme_setup() {
    	if ( is_admin() ) {
    		return;
    	}
    
    	global $easy_testimonials;
    	remove_action( 'wp_head', array( $easy_testimonials, 'easy_testimonials_setup_custom_css' ) );
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Avoid writing empty styles to the page’ is closed to new replies.