Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

register style wordpress

/**
 * Registers a stylesheet.
 */
function wpdocs_register_plugin_styles() {
    wp_register_style( 'my-plugin', plugins_url( 'my-plugin/css/plugin.css' ) );
    wp_enqueue_style( 'my-plugin' );
}
// Register style sheet.
add_action( 'wp_enqueue_scripts', 'wpdocs_register_plugin_styles' );
Source by developer.wordpress.org #
 
PREVIOUS NEXT
Tagged: #register #style #wordpress
ADD COMMENT
Topic
Name
5+9 =