Force BuddyPress to use a specific template pack for your theme
Are you a theme developer and worried about supporting multiple template packs for BuddyPress? Or do you want to control which BuddyPress template pack your theme should work with.
Well, you can override site admin's preference by adding support for a specific template pack.
For example, If you want to make sure that your theme only uses BuddyPress Legacy template pack even if a site admin chooses otherwise, You can configure that by adding following line
1 2 3 4 5 6 | /** * Force BuddyPress to use legacy template pack. */ add_action( 'after_setup_theme', function () { add_theme_support( 'buddypress-use-legacy' ); } ); |
And in case you want to force BuddyPress always use BP Nouveau template pack, you may use the following.
1 2 3 4 5 6 | /** * Force BuddyPress to use nouveau template pack. */ add_action( 'after_setup_theme', function () { add_theme_support( 'buddypress-use-nouveau' ); } ); |
Have fun!