Skip to:
Content
Pages
Categories
Search
Top
Bottom

Disable bbpress jquery/css loading when viewing the blog

  • @ricardouk

    Participant

    Hi everyone

    Is there a way of disabling bbpress jquery and css files loading when a user visits the blog?
    upon installing bbpress the “weight/loading” of a blog page increases a bit, anyway of disabling it? Only loading when someone visits the forum?

    The following code disables the bbpress css, is there a way to disable the javascript/jquery?
    Thanks

    function mp_deregister_bbstyles() {
    if ( function_exists( 'is_bbpress' ) ) {
    if ( !is_bbpress() ) {
    wp_deregister_style( 'bbp-default-bbpress' ); 
    }
    }
    }
    add_action( 'wp_print_styles', 'mp_deregister_bbstyles', 100 );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar