Developers who are new to BuddyPress sometimes find BP templates confusing to work with. Common questions include: Why are there so many? Where do I place the files? How can I override the templates in my project?
BP Project Framework is a plugin from the folks at WebDevStudios that provides a boilerplate for new custom BuddyPress projects. Essentially, it adds all the BuddyPress templates you need in the convenience of a plugin.
BuddyPress has included WordPress theme compatibility since version 1.7, which means that you can activate the plugin and it will work with nearly any theme. However, if you want to customize BuddyPress-specific features, you will need to override the BP templates. Ordinarily, you would copy those templates from the BuddyPress plugin folder into your theme folder. BP Project Framework allows you to skip this step by creating a new template stack.
The plugin includes all of the necessary BP templates in the /templates directory and customizing any of those files will override the core templates. You can also place custom JS and CSS in /templates/js/bp-custom.js
and /templates/js/bp-custom.css
respectively. The /inc directory includes files for placing custom actions, filters, template tags, and widgets.
The bp-custom.php file contains example code for easily customizing BuddyPress. If you’re new to BuddyPress development, you’ll want to check out that file to get an overview of some quick customization options.
The advantage of putting BP templates into this plugin over building them into the current theme is that you can easily activate and deactivate the plugin. It also allows you to maintain your templates if you decide to change themes, without having to move the template files.
When you have the BP Project Framework installed, BuddyPress will first look to the plugin for its template files and then will default to BP core if any are missing. Simply activate the plugin and start adding custom code, edit the template markup and add custom CSS and JS. The plugin has no settings, but the development team at WebDevStudios plans to add some new features and options in the future.
You can find BP Project Framework on GitHub. It’s a great resource for new BuddyPress developers who want a quick start for adding custom code and working with BP templates.
Looks awesome! Would be great to have a similar plugin for customizing WooCommerce.