admin管理员组文章数量:1026989
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.
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.
Share Improve this question asked Jun 4, 2018 at 12:54 RaiRai 411 silver badge3 bronze badges 1- If you are having problems overriding parent templates, make sure the file permissions are correct. If the file cannot be read by the server process, then WordPress will silently fail to find the template file in the child theme. – Flimm Commented Dec 3, 2024 at 10:07
2 Answers
Reset to default 5I 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/themes/theme-compatibility-1-7/a-quick-look-at-1-7-theme-compatibility/
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
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.
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.
Share Improve this question asked Jun 4, 2018 at 12:54 RaiRai 411 silver badge3 bronze badges 1- If you are having problems overriding parent templates, make sure the file permissions are correct. If the file cannot be read by the server process, then WordPress will silently fail to find the template file in the child theme. – Flimm Commented Dec 3, 2024 at 10:07
2 Answers
Reset to default 5I 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/themes/theme-compatibility-1-7/a-quick-look-at-1-7-theme-compatibility/
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
本文标签: templatesHow to override BuddyPress 30 bpnouveau theme files
版权声明:本文标题:templates - How to override BuddyPress 3.0 bp-nouveau theme files? 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745668292a2162302.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论