WP_Enqueue_Style
-
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?
https://www.mythailandholiday.netThis 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&’, 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
- The topic ‘WP_Enqueue_Style’ is closed to new replies.