2

The Buddypress 3.0 uses bp-nouveau template as default. How can I override the CSS and other template files in WordPress theme? Earlier it would be done by copying bp-legacy folder into the WordPress theme folder and renaming it to buddypress but it does not seem to work for the bp-nouveau theme. Even if I copy it to the theme folder, BuddyPress continues to use the files from the buddypress pluginlocation.

I could not find any information about Buddypress 3.0 template structure in the codex.

2

I know it is an old question but im pasting this here in case someone is looking for the same answer.

Overloading Template Compatibility theme files Template compatibility also runs a check to see if two directories or folders exist in a theme:

'buddypress'
'community'

If either of these two folders exist in your theme and they contain BP template files then those files will be used in preference to the bp plugins versions.

Therefore, you can modify any bp theme compatibility template by copying it over from:

/bp-templates/bp-legacy/buddypress/

To:

/my-theme/community/ or /my-theme/buddypress/

N.B. Inside the subfolder ‘community’ you must preserve the path structure/folders that exist in the BP original /buddypress/ folder so /activity/ must be created to hold index.php or any of the other activity templates.

Additionally to keep things neat & tidy you can keep your custom parent template file ‘community.php’ in these folders as well rather than your theme root.

You may override the css by adding a folder /css/* to your theme root if you then, either, copy buddypress.css from /bp-legacy/ or create a new file named buddypress.css this file will be used instead of the buddypress version. * As of BP 1.8 the paths for assets i.e styles and JS has been modified to look to your ‘buddypress’ or ‘community’ folders first, this means you will be able to locate your /css/ folder inside your buddypress one.

Source: https://codex.buddypress.org/themes/theme-compatibility-1-7/a-quick-look-at-1-7-theme-compatibility/

0

Inside your wordpress theme (hopefully a custom or child theme) create a "buddypress" folder.

Then you can override files from the /plugins/buddypress/bp-templates/[buddypress theme] folder. But you must keep the exact same folder structure. It works with bp-nouveau also, I just checked.

For example, if I was using a wordpress theme called "mytheme", and I wanted to override or add something to a single member's profile page, I would create mytheme/buddypress/members/single/home.php

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.