Skip to content

Instantly share code, notes, and snippets.

@brentini
Forked from muzahedul03/function_css.php
Last active March 23, 2018 21:28
Show Gist options
  • Save brentini/2848d4ac99f553e7ca9e0abb61a5c3dd to your computer and use it in GitHub Desktop.
Save brentini/2848d4ac99f553e7ca9e0abb61a5c3dd to your computer and use it in GitHub Desktop.
How Include CSS file in Wordpress using Function #wordpress
<?php
//includes all felxo_theme_file_css
function flexo_theme_file(){
//inculde CSS file
wp_register_style('bootstrap', get_template_directory_uri(). '/css/bootstrap.min.css', array(), '3.1.0',all);
wp_register_style('fancybox', get_template_directory_uri(). '/css/fancybox/jquery.fancybox.css', array(), '3.1.0',all);
wp_register_style('jcarousel', get_template_directory_uri(). '/css/jcarousel.css', array(), '3.1.0',all);
wp_register_style('flexslider', get_template_directory_uri(). '/css/flexslider.css', array(), '3.1.0',all);
wp_register_style('style', get_template_directory_uri(). '/css/style.css', array(), '3.1.0',all);
wp_register_style('default', get_template_directory_uri(). '/skins/default.css', array(), '3.1.0',all);
wp_enqueue_style('bootstrap');
wp_enqueue_style('fancybox');
wp_enqueue_style('jcarousel');
wp_enqueue_style('flexslider');
wp_enqueue_style('style');
wp_enqueue_style('default');
}
add_action('wp_enqueue_scripts', 'flexo_theme_file');
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment