Register WordPress Styles

Overview

Use this tool to create custom code for Styles Registration with wp_register_style() function.

Usage

  • Fill in the user-friendly form.
  • Click the “Update Code” button.
  • Copy the code to your project.
  • Or save it as a snippet and share with the community.

Examples

If you are still learning how to use this tool, check out the following examples:

The function used in the code.
Where to enqueue? Front end, login, admin or embed.
Name used in the code as a stylesheet handle.
URL to the style.
Comma separated list of stylesheets to load before this style.
Stylesheets version number.
The stylesheet media type. i.e. 'all', 'print', 'tv', 'projection'.
Deregister the style first.
Enqueue the style.
Name used in the code as a stylesheet handle.
URL to the style.
Comma separated list of stylesheets to load before this style.
Stylesheets version number.
The stylesheet media type. i.e. 'all', 'print', 'tv', 'projection'.
Deregister the style first.
Enqueue the style.
Name used in the code as a stylesheet handle.
URL to the style.
Comma separated list of stylesheets to load before this style.
Stylesheets version number.
The stylesheet media type. i.e. 'all', 'print', 'tv', 'projection'.
Deregister the style first.
Enqueue the style.
Name used in the code as a stylesheet handle.
URL to the style.
Comma separated list of stylesheets to load before this style.
Stylesheets version number.
The stylesheet media type. i.e. 'all', 'print', 'tv', 'projection'.
Deregister the style first.
Enqueue the style.
Name used in the code as a stylesheet handle.
URL to the style.
Comma separated list of stylesheets to load before this style.
Stylesheets version number.
The stylesheet media type. i.e. 'all', 'print', 'tv', 'projection'.
Deregister the style first.
Enqueue the style.
  Save Snippet
// Register Style
function custom_styles() {

	wp_deregister_style( 'font-awesome' );
	wp_register_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css', false, '4.1.0' );
	wp_enqueue_style( 'font-awesome' );

}
add_action( 'wp_enqueue_scripts', 'custom_styles' );