Created
June 11, 2017 17:44
-
-
Save mojowill/fcf45bb522113117b848039edf41da7a to your computer and use it in GitHub Desktop.
WordPress CSS 1
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', false, null, 'screen' ); | |
wp_register_style( 'child_main', get_stylesheet_directory_uri() . '/style.css', false, 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