Created
June 11, 2017 17:45
-
-
Save mojowill/65dd061d33577557400e617b07a188b6 to your computer and use it in GitHub Desktop.
WordPress CSS 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function global_css() { | |
wp_register_style( 'parent_main', get_template_directory_uri() . '/css/main.css' , filemtime( get_template_directory() . '/css/main.css' ), null, 'screen' ); | |
wp_register_style( 'child_main', get_stylesheet_directory_uri() . '/style.css' , filemtime( get_stylesheet_directory() . '/style.css' ), null, 'screen' ); | |
if ( ! is_admin() ) : | |
wp_enqueue_style( 'parent_main' ); | |
endif; | |
wp_enqueue_style( 'child_main' ); | |
} | |
add_action( 'wp_print_styles', 'global_css' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment