Title: WP_Enqueue_Style
Last modified: September 1, 2016

---

# WP_Enqueue_Style

 *  [g4orce](https://wordpress.org/support/users/g4orce/)
 * (@g4orce)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/wp_enqueue_style-3/)
 * I am fairing new to CSS and JavaScript and now wanted to combine them into one
   file to reduce the amount of HTTP requests when loading my website.
    I have read
   so many posts and tutorials but cannot seem to get it working. I have combined
   my CSS but when adding it to the function.php file the Website gets a HTTP 500
   error. Can anyone please tell me what I am doing wrong? [http://www.mythailandholiday.net](http://www.mythailandholiday.net)
 * This is the code I am using
 * > <?php
   >  function enqueue_custom_stylesheets() { wp_register_style( ‘open-sans-
   > css’, get_template_directory_uri() . ‘/fonts.googleapis.com/css?family=Open
   > +Sans%3A300italic%2C400italic%2C600italic%2C300%2C400%2C600&subset=latin%2Clatin-
   > ext&#038’, array(‘jquery’),’4.5.3′,’all’); wp_enqueue_style( ‘open-sans-css’);
   > wp_register_style( ‘dashicons-css’, get_template_directory_uri() . ‘/wp-includes/
   > css/dashicons.min.css’, array(‘jquery’),’4.5.3′,’all’); wp_enqueue_style( ‘
   > dashicons-css’ ); wp_register_style( ‘admin-bar-css’, get_template_directory_uri().‘/
   > wp-includes/css/admin-bar.min.css’, array(‘jquery’),’4.5.3′,’all’); wp_enqueue_style(‘
   > admin-bar-css’ ); wp_register_style( ‘ccchildpagescss-css’, get_template_directory_uri().‘/
   > wp-content/plugins/cc-child-pages/includes/css/styles.css’, array(‘jquery’),’
   > 1.32′,’all’); wp_enqueue_style( ‘ccchildpagescss-css’ ); wp_register_style(‘
   > ccchildpagesskincss-css’, get_template_directory_uri() . ‘/wp-content/plugins/
   > cc-child-pages/includes/css/skins.css’, array(‘jquery’),’1.32′,’all’); wp_enqueue_style(‘
   > ccchildpagesskincss-css’ ); wp_register_style( ‘rfw-slider-style-css’, get_template_directory_uri().‘/
   > wp-content/plugins/rss-feed-widget/jquery.bxslider.css’, array(‘jquery’),’4.5.3′,’
   > all’); wp_enqueue_style( ‘rfw-slider-style-css’ ); wp_register_style( ‘graphene-
   > stylesheet-css’, get_template_directory_uri() . ‘/wp-content/themes/graphene/
   > style.css’,’4.5.3′, array(‘jquery’),’screen’); wp_enqueue_style( ‘graphene-
   > stylesheet-css’ ); wp_register_style( ‘query-monitor-css’, get_template_directory_uri().‘/
   > wp-content/plugins/query-monitor/assets/query-monitor.css’, array(‘jquery’),’
   > 1466624211′,’all’); wp_enqueue_style( ‘query-monitor-css’ ); wp_register_style(‘
   > jetpack_css’, get_template_directory_uri() . ‘/wp-content/plugins/jetpack/css/
   > jetpack.css’,’4.0.4′, array(‘jquery’),’all’); wp_enqueue_style( ‘jetpack_css’);
   > wp_register_style( ‘metaslider-flex-slider-css’, get_template_directory_uri().‘/
   > wp-content/plugins/ml-slider/assets/sliders/flexslider/flexslider.css’, array(‘
   > jquery’),’3.3.7′,’all’); wp_enqueue_style( ‘metaslider_flex_slider-css’ ); 
   > add_action( ‘wp_enqueue_scripts’ , ‘enqueue_custom_stylesheets’ ); ?>
 * Again I am pretty new to this but from what I have read I can’t see where I am
   going wrong

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [klaudiom](https://wordpress.org/support/users/klaudiom/)
 * (@klaudiom)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/wp_enqueue_style-3/#post-7516829)
 * Hi,
 * I also wanted to do the same thing and as it turns out, it gets quite messy with
   wordpress. I’ve read this awesome article on CSS Tricks
 * [https://css-tricks.com/taking-control-cssjs-wordpress-plugins-load/](https://css-tricks.com/taking-control-cssjs-wordpress-plugins-load/)
 * However, since then I’ve discovered this awesome plugin which actually does everything
   for you.
 * I highly recommend it , I’ve also tried it on a large scale site and it worked
   like a charm. It puts all the JS and css in one file and you can choose which
   files to concatenate and/or move to footer.
 * [https://wordpress.org/plugins/bwp-minify/](https://wordpress.org/plugins/bwp-minify/)
 *  Thread Starter [g4orce](https://wordpress.org/support/users/g4orce/)
 * (@g4orce)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/wp_enqueue_style-3/#post-7516836)
 * I understand this Minify’s the files but according to GTMetrix it has not done
   this and still sending many requests

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘WP_Enqueue_Style’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [g4orce](https://wordpress.org/support/users/g4orce/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/wp_enqueue_style-3/#post-7516836)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
