2016-06-08 57 views
0

我想將所有的css合併到一個文件中。我可以手動做,但我不明白wp_register_style的最後一個參數。如何在wordpress中合併css文件

從筆記本電腦它加載所有的CSS。

 wp_register_style('desktop-small-css', get_template_directory_uri().'/css/desktop.small.css','','','(max-width:'.get_option($dynamo_tpl->name . '_theme_width', '1230').'px)'); 
     wp_enqueue_style('desktop-small-css'); 

     wp_register_style('tablet-css', get_template_directory_uri().'/css/tablet.css','','','(max-width:'.get_option($dynamo_tpl->name . '_tablet_width', '1030').'px)'); 
     wp_enqueue_style('tablet-css'); 

     wp_register_style('tablet-small-css', get_template_directory_uri().'/css/tablet.small.css','','','(max-width:'.get_option($dynamo_tpl->name . '_small_tablet_width', '820').'px)'); 
     wp_enqueue_style('tablet-small-css'); 

     wp_register_style('mobile-css', get_template_directory_uri().'/css/mobile.css','','','(min-width:'.get_option($dynamo_tpl->name . '_mobile_width', '580').'px)'); 
     wp_enqueue_style('mobile-css'); 

回答