Advertisement
mikelittle

cascade style sheets in a child theme

Jan 9th, 2014
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.61 KB | None | 0 0
  1. <?php
  2. /* code to add to the functions.php of a child theme. This ensures the parent theme's css is loaded so you can override things in your child theme stylesheet. */
  3.  
  4. /* include default style and our override */
  5. add_filter( 'wp_enqueue_scripts', 'iae2_scripts_styles' );
  6. function iae2_scripts_styles() {
  7.     /*
  8.      * Loads our main stylesheets
  9.      */
  10.     wp_register_style( 'ias2-style', path_join( get_template_directory_uri(), 'style.css' ) );
  11.     wp_enqueue_style( 'ias2-style' );
  12.  
  13.     wp_register_style( 'ias-nf2-style', path_join( get_stylesheet_directory_uri(), 'style.css' ) );
  14.     wp_enqueue_style( 'ias-nf2-style' );
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement