Skip to:
Content
Pages
Categories
Search
Top
Bottom

Dequeue bp-nouveau css


  • John
    Participant

    @jhob

    I want to dequeue, or override, the bp-nouveau stylesheet. I have tried:

    function dequeue_buddypress() {
    	if (!is_admin()) {
    		wp_dequeue_style('bp-nouveau');
            wp_deregister_style('bp-nouveau');
    	}
    }
    add_action('wp_enqueue_scripts', 'dequeue_buddypress', 1);

    Have also played with priorities from 1 to 99 and tried the handle bp-nouveau-css.

    as well as trying to override the css in the theme but neither has worked.

    Anyone know how I can get the bp-nouveau css to dequeue?

Viewing 5 replies - 1 through 5 (of 5 total)

  • Brajesh Singh
    Participant

    @sbrajesh

    Hi,
    Try using this

    
    
    /**
     * Dequeue BP Nouveau style
     */
    function buddydev_dequeue_nouveau_styles() {
    	wp_dequeue_style( 'bp-nouveau' );
    }
    
    add_action( 'wp_enqueue_scripts', 'buddydev_dequeue_nouveau_styles', 11 );
    

    Does it work for you?


    John
    Participant

    @jhob

    Thanks for the reply Brajesh.

    Unfortunately that didn’t work. It’s pretty much what I had already tried, except with a differing priority.

    Seems that CSS does not want to dequeue!


    Brajesh Singh
    Participant

    @sbrajesh

    It’s strange. Anything after 10 should work.
    yes, is almost same(I simply removed the admin check as it was not needed in this case).

    I tried the code in bp-custom.php and it is working with the default theme.

    Are you using some custom theme?


    John
    Participant

    @jhob

    Ah, I had it in functions.php just moved it into bp-custom.php and it worked!

    Still getting used to remembering to put buddypress stuff in bp-custom.php rather than functions.php.

    Thanks 🙂

    John


    Brajesh Singh
    Participant

    @sbrajesh

    No Problem.
    You are welcome. Glad it worked for you 🙂

    Best regards
    Brajesh

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar