Created
April 6, 2012 16:59
-
-
Save dlh01/2321320 to your computer and use it in GitHub Desktop.
Template for registering and enqueueing scripts and styles in WordPress
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 | |
/** | |
* | |
* Register and enqueue assets | |
* | |
*/ | |
add_action( 'wp_enqueue_scripts', 'function_name_here' ); | |
function function_name_here() { | |
/** | |
* | |
* Stylesheets | |
* | |
*/ | |
// Register stylesheet | |
// wp_register_style( | |
// '', // handle | |
// get_stylesheet_directory_uri() . '', // src | |
// '', // deps | |
// '' // version | |
// ); | |
/** | |
* | |
* Scripts | |
* | |
*/ | |
// Register script | |
// wp_register_script( | |
// '', // handle | |
// get_template_directory_uri() . '', // src | |
// '', // deps | |
// '', // version | |
// '' // in footer? | |
// ); | |
/** | |
* | |
* Enqueue needed assets | |
* | |
*/ | |
// wp_enqueue_style( '' ); | |
// wp_enqueue_script( '' ); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment