Skip to:
Content
Pages
Categories
Search
Top
Bottom

how to enqueue a new stylesheet


  • infernoprime
    Participant

    @infernoprime

    I would like to ask if this code looks workable. I can not seem to find a how-to guide nor can I seem to find anyone who is even willing to help me with this.

        //* Remove bp-nouveau style
        add_action( 'wp_enqueue_scripts', 'remove_bp_nouveau_styles', 11 );
        function remove_bp_nouveau_styles() {
        	wp_dequeue_style( 'bp-nouveau');
            wp_deregister_style( 'bp-nouveau');    
    }
    
    //* Register and Enqueue Stylesheet
        add_action( 'wp_enqueue_scripts', 'enqueue_profile_style_sheet' );
        function enqueue_profile_style_sheet() {
        	wp_register_style( 'profile', get_stylesheet_directory_uri() . '/css/profile.css', false, '1.0.0' );
        	wp_enqueue_style( 'profile' );
        }
  • You must be logged in to reply to this topic.
Skip to toolbar