Created
October 4, 2013 03:43
-
-
Save wcodex/6820676 to your computer and use it in GitHub Desktop.
Add stylesheet in WordPress in correct way
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
<?php | |
/* | |
You can add the stylesheet link tag directly on the page using the wp_head action | |
You can add the stylesheet link tag directly to the page anywhere. | |
You can use the wp_enqueue_scripts action to add a handle to the wp_enqueue_style. | |
Syntax | |
wp_enqueue_style( $handle, $src, $deps, $ver, $media ); | |
*/ | |
wp_register_style('New_style_id', get_template_directory_uri().'[New style URL', array(), '1', 'screen'); | |
wp_enqueue_style('New_style_id'); | |
/* | |
Using this we can add multiple stylesheets in WordPress themes | |
*/ | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment