Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: conditional bp header items


r-a-y
Keymaster

@r-a-y

I’ve been thinking of doing this.

Will investigate and report back.

[EDIT]

Here’s one way of doing what you want to do.

I’ve made it so that the main WP theme will not load the core BP CSS/JS files.

But on BP pages, it will load them.

Enter this only on your WP theme’s functions.php:

function remove_bp_cssjs() {
remove_action('wp', 'bp_core_add_js');
}
add_action('init', 'remove_bp_cssjs');

Caveats with this approach is you’ll need to load the bp_core_add_js() function again manually if you use any BP widget on any WP post or page.

A way to do this is to manually add the BP CSS styles to your main WP theme’s stylesheet, while using Justin Tadlock’s Javascript Logic plugin to load the BP javascripts on a conditional basis. I’ll let you figure that one out ;)

I’m also looking at trimming more of the BP fat by removing the widget CSS files that are left over as well.

Stay tuned…

Skip to toolbar