Register Style Generator

Home » WordPress Generators » Register Style Generator

Related WordPress generators Register script generator Widget generator Sidebar generator Go back to all generators

The name of the function that will be created.
Child Theme Support
Allow child themes to override this function.
Where do you want this style to be used/hooked? Frontend, Login, Admin, etc.
The handle/name of the css stylesheet.
The source of the stylesheet. Relative to directory or use a full URL.
Use a URL for this stylesheet source instead of the relative theme path.
Comma seperated list of dependencies of this stylesheet.
The version of the script.
The media type of the stylesheet. If you don’t know what this is, leave it to the default.
Deregister First
Should the stylehseet be deregistered first?
Enqueue Style
Should the stylesheet be enqueued as well?
                    function wpturbo_register_my_custom_styles(){
	wp_register_style( 'my-style', get_template_directory_uri() . 'style.css', array() );
	wp_enqueue_style( 'my-style' );
add_action( 'wp_enqueue_scripts', 'wpturbo_register_my_custom_styles' );

Sign up to save your WordPress snippets on WPTurbo.