• Resolved masoyag

    (@masoyag)


    Hi,
    first of all Autoptimize is awesome – thank you for your work.

    I have issue with Vantage theme.

    In functions.php there is this code:

    add_action( 'widgets_init', 'vantage_widgets_init' );
    
    function vantage_print_styles(){
    	if( !siteorigin_setting('layout_responsive') ) return;
    
    	// Create the footer widget CSS
    	$sidebars_widgets = wp_get_sidebars_widgets();
    	$count = isset($sidebars_widgets['sidebar-footer']) ? count($sidebars_widgets['sidebar-footer']) : 1;
    	$count = max($count,1);
    
    	?>
    	<style type="text/css" media="screen">
    		#footer-widgets .widget { width: <?php echo round(100/$count,3) . '%' ?>; }
    		@media screen and (max-width: 640px) {
    			#footer-widgets .widget { width: auto; float: none; }
    		}
    	</style>

    When Autoptimize is disabled it just prints it in page as:
    #footer-widgets .widget{width:100%}@media screen and (max-width:640px){#footer-widgets .widget{width:auto;float:none}}
    But when plugin is enabled it creates a separate css file with just this code.

    How I can leave it as print css?

    Many thanks

    https://wordpress.org/plugins/autoptimize/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Print css gets into seprate css file’ is closed to new replies.