Including scripts and styles properly

Since this has been a discussed topic over support forums and IRC this week, a very quick scripts and style guide for WordPress. The function for including a stylesheet is wp_enqueue_style: [php]wp_enqueue_style( $handle, $src, $deps, $ver, $media );[/php] You can define the handle for the style (as a reference for other styles later), the location, dependent styles (when you need a style to be loaded after other styles), it's version if needed and the type of stylesheet (all, print, screen, handheld) Each script is included via wp_enqueue_script: [php]wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer );[/php] The first four arguments are identical,… Continue Reading