Skip to content

Instantly share code, notes, and snippets.

@dlh01
Created April 6, 2012 16:59
Show Gist options
  • Save dlh01/2321320 to your computer and use it in GitHub Desktop.
Save dlh01/2321320 to your computer and use it in GitHub Desktop.
Template for registering and enqueueing scripts and styles in WordPress
<?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