Creating BuddyPress Supported Theme and Modifying Templates
- March 24, 2017
- Leave a comment
BuddyPress – a free social network WP plugin made it possible for you to use social networking features in a WordPress site. In this article, you will learn how to create BuddyPress supported Theme and modify the default BuddyPress templates.
Before creating a BuddyPress Theme, you must know how to create a WordPress theme. Below is the default hierarchy of BuddyPress template files:
Creating a New BuddyPress Supported Theme
For creating a new BuddyPress Theme, you need to create a buddypress folder in your Theme’s folder and then copy all the folders from buddypress plugin folder wp-content/plugins/buddypress/bp-legacy/buddypress to your new Theme’s buddypress folder wp-content/themes/custom-buddypress-theme/buddypress/.
Now, you can redesign and modify the buddypress templates according to your website design. For example if you want to modify members templates, go to the single folder wp-content/themes/custom-buddypress-theme/buddypress/members/single.
From this single folder, you can modify any template like friends, messages, and profile, etc.
Modifying BuddyPress Parent Theme Template
For modifying BuddyPress Parent Theme (which is already created by BuddyPress theme), you need to create a Child Theme. If you will not create a Child Theme, you can lose all the modifications when you upgrade your theme to a new version.
Now you can paste the template (which you want to modify) into Child Theme’s buddypress folder wp-content/themes/custom-buddypress-theme-child/buddypress/.
For example if you want to modify the activity template, you can paste the activity folder wp-content/themes/custom-buddypress-theme/buddypress/activity from Parent to Child Theme’s buddypress folder wp-content/themes/custom-buddypress-theme-child/buddypress/activity.