enqueue main stylesheet in parent theme funcrions.php] code example

Example 1: wordpress enqueue style child theme

// To enqueue the WordPress way your CSS sources
// INSIDE your theme/child functions.php:

function wp_starter_scripts() {
	wp_enqueue_style( 'wp-style-menu', get_template_directory_uri() . '/style-menu.css' );
	wp_enqueue_style( 'wp-style-buttons', get_template_directory_uri() . '/style-buttons.css' );
	wp_enqueue_style( 'wp-style-footer', get_template_directory_uri() . '/style-footer.css' );
  }
add_action( 'wp_enqueue_scripts', 'wp_starter_scripts' );

Example 2: function for style your theme wordpress php

wp_enqueue_style( 'slider', get_template_directory_uri() . '/css/slider.css',false,'1.1','all');

Tags:

Misc Example