php wp_register_style( $handle, $src, $deps, $ver, $media );

Use the wp_enqueue_scripts action to call this function. Calling it outside of an action can lead to problems. See #17916 for details.

Parameters
$handle
(string) (required) Name of the stylesheet (which should be unique as it is used to identify the script in the whole system).
Default: None
$src
(string) (required) URL to the stylesheet. Example: ‘http://example.com/css/mystyle.css’. You should never hardcode URLs to local styles, use plugins_url()(for Plugins) and get_template_directory_uri() (for Themes) to get a proper URL. Remote assets can be specified with a protocol-agnostic URL, i.e. ‘//otherdomain.com/css/theirstyle.css’.
Default: None
$deps
(array) (optional) Array of handles of any stylesheets that this stylesheet depends on. Dependent stylesheets will be loaded before this stylesheet.
Default: array()

Our Partners