Created
January 15, 2015 16:36
-
-
Save ErikBernskiold/355a02d14963b31c281b to your computer and use it in GitHub Desktop.
Enqueue Main Stylesheet in Functions
This file contains hidden or 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
| if ( ! function_exists( 'mysite_enqueue_styles' ) ) : | |
| /** | |
| * Stylesheets | |
| * | |
| * Registers and enqueues theme stylesheets. | |
| **/ | |
| function mysite_enqueue_styles() { | |
| // Register | |
| // wp_register_style( $handle, $src, $deps, $ver, $media ); | |
| wp_register_style( 'style', get_stylesheet_uri, false, '1.0', 'all' ); | |
| // Enqueue | |
| wp_enqueue_style( 'style' ); | |
| } | |
| add_action( 'wp_enqueue_scripts', 'mysite_enqueue_styles' ); | |
| endif; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment