Codex Home → Legacy Docs → Archived Section: Theme Development → Themes & the BuddyPress Template Pack → Template Pack for Theme Compatibility (v1.2)
Template Pack for Theme Compatibility (v1.2)
Archived file. Good only up to BP 1.6.5 version
To enable compatibility for your existing WordPress theme with BuddyPress, please download and activate the BuddyPress Template Pack plugin. This will run you through the process step-by-step.
The Process At-A-Glance
This requires a working knowledge of HTML and CSS at the very least.
After you install and activate the BP Template Pack plugin, head over to admin dashboard > Appearance > BP Compatibility panel.
Step One
BuddyPress needs some extra template files in order to display its pages correctly. This plugin contains these extra templates, but right now they are in the plugin directory. They need to be inside your active theme directory to work correctly. First of all we can try moving them automatically, please click the button below to attempt to move the templates:
Move Template Files
Click on 「Move Template Files」 link
Step Two
Templates moved successfully! This is great news, BuddyPress templates are now in the correct position in your theme which means you can skip step two and move on to step three.
Click on 「move on to step three」 link
Step Three
Now that the template files are in the correct location, click through your site (you can come back to this page at any point). You should see a BuddyPress admin bar at the top of the page, try visiting some of the links in the 「My Account」 menu. You should find that BuddyPress pages now work and are displayed.
If you find that the pages are not quite aligned correctly, or the content is overlapping the sidebar, you will need to tweak the template HTML. Please follow the 「fixing alignment」 instructions below. If the content in your pages is aligned in the correct place then you can skip to the 「Finishing Up」 section at the bottom of this page.
Fixing Alignment
By default BuddyPress templates use this HTML structure:
[HEADER]
[FOOTER]
If BuddyPress pages are not aligned correctly then you will need to modify some of the templates to match your theme』s HTML structure. The best way to do this is to FTP to your theme』s files at:
http://yoursite.com/wp-content/themes/active-WordPress-theme-folder/
Then open up the page.php file (if this does not exist use index.php). Make note of the HTML template structure of the file, specifically the
You will need to change the HTML structure in the BuddyPress templates that you copied into your theme to match the structure in your page.php or index.php file. The files that you need to edit are as follows (leave out any folders you have not copied over in step two):
activity/index.php
blogs/index.php
blogs/create.php
forums/index.php
groups/index.php
groups/create.php
groups/single/home.php
groups/single/plugins.php
members/index.php
members/single/home.php
members/single/plugins.php
registration/register.php
registration/activate.php
Once you are done matching up the HTML structure of your theme in these template files, please take another look through your site. You should find that BuddyPress pages now fit inside the content structure of your theme.
Finishing Up
You』re now all done with the conversion process. Your WordPress theme will now happily provide BuddyPress compatibility support. Once you hit the finish button you will be presented with a new permanent theme options page allowing you to tweak some settings.
Finish
Final Steps
__Disable BP Template Pack CSS
The BuddyPress template pack comes with basic wireframe CSS styles that will format the layout of BuddyPress pages. You can extend upon these styles in your theme』s CSS file, or simply turn them off and build your own styles.
___Disable BP Template Pack JS / AJAX
The BuddyPress template pack will automatically integrate the BuddyPress default theme javascript and AJAX functionality into your theme. You can switch this off, however the experience will be somewhat degraded.
Save Settings
NOTE: To remove the 「BuddyPress is ready」 message you will need to add a 「buddypress」 tag to your theme. You can do this by editing the style.css file of your active theme and adding the tag to the 「Tags:」 line in the comment header.
Navigation Links
You may want to add new navigation tabs or links to your theme to link to BuddyPress directory pages. The default set of links are:
Activity: http://yoursite.com/activity/
Members: http://yoursite.com/members/
Groups: http://yoursite.com/groups/
Forums: http://yoursite.com/forums/
Register: http://yoursite.com/register/ (registration must be enabled)
Blogs: http://yoursite.com/blogs/
Reset Setup
If you would like to run through the setup process again please use the reset button (you will start at step three if you haven』t removed the template files):
Reset
Example
BP Template Pack Walkthrough – Easy Level
安裝 BuddyPress 外掛
Codex Home → Getting Started → Customizing → Installing BuddyPress Plugins
Installing BuddyPress Plugins
Plugins which extend BuddyPress are available at:
https://wordpress.org/extend/plugins/tags/buddypress
https://buddypress.org/extend/plugins/
Make sure that the plugin tagged as 「buddypress」 is compatible with the BP/WP version activated in your server. Note that some BuddyPress plugins require PHP 5+. Also note that when extending BuddyPress using various 3rd party plugins and themes acquired in the WordPress repo or elsewhere, it is advisable to check against other plugins and registration upon activating each individual plugin and/or theme. Reason being is that some plugins and themes do not always play well with certain BuddyPress plugins, themes and the registration. So by using a process of elimination by testing each plugin and theme individually you will avoid having to go through many plugins at one time trying to find the culprit that causes a conflict within your installation.
[This article is still incomplete and will be expanded at a later time.]
頭像上傳失敗
Codex Home → Getting Started → Troubleshooting → Avatar upload fails
Avatar upload fails
There could be a number of reasons uploads would fail, your server error logs may provide a clue as to what has happened.
The predominant reason uploads fail is due to the server being unable to write to the uploads directory, the 『server』 in this instance is the server process that is running your web server and on *nix boxes is generally 『httpd』 or 『Apache』 this process and it』s 『group』 or 『owner』 must have access to the sites folder structure.
When uploads such as Avatars do fail establish whether this is a general uploads failure by attempting to upload an image via the WordPress Media library interface, more often than not this, too, will fail and you will know it』s an owner/permissions failure that needs correcting – you may need to contact your host to have this corrected explaining that the server process can』t write to your site directories, specifically 『uploads』.
Another important factor is that the PHP image manipulation extension must be installed, make sure you have the 『GD image library』 installed by checking your phpinfo stats – usually available if you have control panel installed if not you would need to upload a file to your site root with the single command in and navigate your browser to that file to see all your PHP configuration detail. Remember to remove that file from your site root after you』ve copied the details for reference.
Next, check permissions, so make sure the web server has correct permissions.
/wp-content/uploads should be set to 755 on a Unix server.
On this matter you may see advice along the lines of setting permissions to 『777』 or 『world writeable』. This is bad advice. Changing permissions to 『777』 may overcome the problem but there is never a case where any folders need completely open permissions; it』s very insecure.
BP_ENABLE_MULTIBLOG
Codex Home → Getting Started → Customizing → BP_ENABLE_MULTIBLOG
BP_ENABLE_MULTIBLOG
This page is incomplete or needs checking and verifying or updating.
BP_ENABLE_MULTIBLOG is a BuddyPress constant that, when defined as true, allows your BuddyPress content to be displayed on any site in your WordPress Multisite network.
By default, BP_ENABLE_MULTIBLOG is disabled.
Description
On a normal BuddyPress installation (with BP_ENABLE_MULTIBLOG disabled), BuddyPress content – groups, profiles, etc – can only be viewed on the 「root blog」. So, for example, your BuddyPress profile is, by default, located at a URL that looks like this:
http://example.com/members/boonebgorges/
and it is displayed using the BuddyPress theme powering your root blog at http://example.com/. This is true even if you allow users to create subdomain or subdirectory blogs, such as http://boone.example.com/ or http://example.com/boone/ – links to BuddyPress content, such as those that appear in your BuddyBar or WP toolbar, will always point back toward the root blog.
With BP_ENABLE_MULTIBLOG enabled, BuddyPress content will be displayable on any site in your network, and BP links will always point to the current site. Thus,
on http://boone.example.com/, profile links will point to http://boone.example.com/members/boonebgorges/
on http://example.com/boone/, profile links will point to http://example.com/boone/members/boonebgorges/
on http://example.com/, profile links will point to http://example.com/members/boonebgorges
and so forth.
Usage
To turn on BP_ENABLE_MULTIBLOG mode, put the following line in your wp-config.php file, somewhere above 「That』s all, stop editing!」:
define( 'BP_ENABLE_MULTIBLOG', true );
Some warnings about BP_ENABLE_MULTIBLOG
BP_ENABLE_MULTIBLOG is not appropriate for most situations, and you should be sure to understand its limitations carefully before enabling it.
Note that BP_ENABLE_MULTIBLOG is not the same thing as WordPress Multisite, and BP_ENABLE_MULTIBLOG is not necessary for your users to have their own sites/blogs.
BP_ENABLE_MULTIBLOG does not enable separate BuddyPress networks on your installation. While it will be possible to view boonebgorges』s profile at more than one URL, the profile data itself (and group data, etc) will be the same on each site in your network. For multi-network BuddyPress, see https://wordpress.org/extend/plugins/bp-multi-network/.
Example use case
Enabling BuddyPress content to be displayable on any site in your network can be useful when supporting multilingual versions of your site.
If your setup has a separate site for each language, then setting BP_ENABLE_MULTIBLOG to true allows you to access the BuddyPress pages in each language, e.g.:
http://mysite.com/members
http://french.mysite.com/members
http://spanish.mysite.com/members
http://german.mysite.com/members
Using a separate site for each language is one of the common approaches to multilingual web sites. In the WordPress specific world, it』s the approach that』s adopted by the Multilingual Press plugin https://wordpress.org/plugins/multilingual-press/.
[Note: a future challenge is how to handle multisite networks, where we want to allow some sites to support BuddyPress pages, but disable support on other sites in the network. As well as underlying implementation, 『Super Admin』 controls to manage this would be useful.]
主題函式 (functions.php)
Codex Home → BuddyPress Theme Development → functions.php
functions.php
You』ve probably heard a lot of talk about a theme』s functions.php file on the BuddyPress forums or WordPress forums.
So what is it?
functions.php is a file in your theme』s folder where you can add a bunch of custom code hacks and modifications to your theme.
When to use it
functions.php is a sister file to bp-custom.php which may exist in your sites plugin folder. Both files perform a similar type of service, running snippets of code for a site. There are two primary differences in these files though, bp-custom.php runs from the plugins folder and is therefore independent of your theme so is useful for adding snippets that you require to interact with BP regardless of the theme in use also it runs at a specific point in the loading of BP that allows BP to acknowledge it』s instructions, functions.php on the other hand is tied to a specific theme so code in it is only run for that theme, changing themes means those snippets of code will no longer be run unless transfers to the other theme. Choosing which file you need to place your code in is largely a matter of choice, most bp code may be run from function.php and this file generally exists in theme folders already as it may be running WP functions so running your BP code in this file is the usual option and using suitable hooks to ensure your code runs at specific points in the BP process should allow most BP functions to execute but if those do not work or you want your code modifications to be available to any theme then run your code in bp-custom.php.
Creating your file
If you don』t have a file called functions.php in your theme』s folder, go ahead and create one by creating a blank file with the following:
It』s important to note:
that when running child themes, where the parent theme has a functions.php file and your child theme also has one that both files are loaded, the child theme file is checked first (in the same principle that WP manages template hierachy) but then the parent file is run, this is important because if your try and declare the same functions in both you will get a 『Cannot redeclare』 error.
In difference with a normal php file, functions.php must begin with an opening php tag ().
When you encounter a forum thread telling you to put a code snippet in your theme』s functions.php, now you』ll know what to do!
?12<?php// hacks and mods will go here
在輔助部落格上安裝
Codex Home → Legacy Docs → Archived Section: Getting Started → Installing on a Secondary Blog
Installing on a Secondary Blog
Archived file. Good only up to BP 1.5 version
***The following pertains to administrators using WordPress 3.0 in network mode)***
This option might appeal to you if you want to style and theme BuddyPress differently than your root blog.
For example, say you have an existing WordPress setup located at hxxp://example.com, but you really want to have BuddyPress located at hxxp://example.com/community (if you setup your network as a subdirectory install) or hxxp://community.example.com (if you setup your network as a subdomain install).
Interested? Read on!
(1) Configure the BP_ROOT_BLOG:
In order to run Buddypress on a secondary blog, you should create a second blog and modify BuddyPress』 internal settings to set your new blog as the BP root blog.
Next, define the 『root』 blog you would like BuddyPress to reside at by adding the code snippet below to wp-config.php:
define ( 'BP_ROOT_BLOG', $blog_id );
Example:
define ( 'BP_ROOT_BLOG', 3 );
Note: In WordPress 3.1, your $blog_id can be found by navigating to the 「Network Admin > Sites」 page and hovering over the blog in question. You should see a link that resembles this:
http://example.com/wp-admin/network/site-info.php?id=1
Your $blog_id, in this instance, would be 1.
For WordPress 3.0, the $blog_id can be found in the 「ID」 column of the 「Super Admin > Blogs」 page.
(2) Activate the BuddyPress plugin and a BuddyPress-enabled theme
Now that you have defined the BP root blog, activate a BuddyPress-enabled theme on this blog such as the 「BuddyPress Default」 theme.
(3) Keep your old BuddyPress user / group avatars
Note: This does not apply to fresh BuddyPress installs!
When you move BuddyPress to a secondary blog, the upload path to your BuddyPress avatars will change. This means your avatars will be lost.
Don』t fret though! To have your old BuddyPress user and group avatars linked from their old location, add the following lines to your bp-custom.php file:
define( 'BP_AVATAR_UPLOAD_PATH', 'YOUR_ABSOLUTE_PATH_TO_YOUR_OLD_BP_LOCATION' );
define( 'BP_AVATAR_URL', 'YOUR OLD BUDDYPRESS URL' );
For example, say you previously installed Buddypress on your root blog (blog id #1) at hxxp://example.com, you would fill in:
define( 'BP_AVATAR_UPLOAD_PATH', '/var/www/wp-content/blogs.dir/1/files' );
define( 'BP_AVATAR_URL', 'hxxp://example.com/files' );
(4) Redirect previous BuddyPress permalinks
Note: This does not apply to fresh BuddyPress installs!
Now that you have BuddyPress setup under a secondary blog, you will want to redirect your old BuddyPress permalinks so they』ll successfully resolve to their new location.
*** The following example is for a BP install on a network subdirectory setup, if you』re using a network subdomain install, your .htaccess rules will be a variation on what is posted below ***
eg. Old BuddyPress location -> New BuddyPress location
hxxp://example.com -> hxxp://example.com/community/
hxxp://example.com/members/admin -> hxxp://example.com/community/members/admin
hxxp://example.com/groups/ -> hxxp://example.com/community/groups/
hxxp://example.com/blogs/ -> hxxp://example.com/community/blogs
To do this, navigate to where your wp-config.php file is located and in the same directory, there should be a .htaccess file.
Open this file in a text editor.
Above the line:
# add a trailing slash to /wp-admin
Add the following:
RedirectMatch 301 ^/members/(.*)$ http://example.com/community/members/$1
RedirectMatch 301 ^/groups/(.*)$ http://example.com/community/groups/$1
RedirectMatch 301 ^/blogs/(.*)$ http://example.com/community/blogs/$1
RedirectMatch 301 ^/forums/(.*)$ http://example.com/community/forums/$1
—
Now you can enjoy your BuddyPress install at its new location!
* Posted by r-a-y.
安裝
Codex Home → Getting Started → Installation
Installation
Before installing BuddyPress, please make sure that you』ve checked the minimum server requirements and WordPress version compatibility.
Automated Installation
Download and install WordPress.
Head to your 「Plugins → Add New」 menu in wp-admin. Search and install 『BuddyPress』.
Make sure you have pretty permalinks enabled on your WordPress install.
Activate BuddyPress. You will be redirected to the BuddyPress Welcome screen.
Manual Installation
Download BuddyPress.
Upload the plugin to the wp-content/plugins folder in your WordPress directory online using your favorite FTP program.
Make sure you have pretty permalinks enabled on your WordPress install.
Go to your admin dashboard → Plugins → Installed Plugins
Activate BuddyPress. You will be redirected to the BuddyPress Welcome screen.
⇒ Next: Configure BuddyPress
⇐ Previous: Getting Started
主題和 BuddyPress 模板包
Codex Home → Legacy Docs → Archived Section: Theme Development → Themes & the BuddyPress Template Pack
Themes & the BuddyPress Template Pack
Archived file. Good up to BP 1.6.5 version
To enable your existing WordPress theme for BuddyPress, please download and activate the BuddyPress Template Pack plugin. This will run you through the process step-by-step.
The Process At-A-Glance
This requires a working knowledge of HTML and CSS at the very least.
After you install and activate the BP Template Pack plugin, head over to admin dashboard > Appearance > BP Compatibility panel.
Step One: Moving template files automatically
BuddyPress needs some extra template files in order to display its pages correctly. This plugin will attempt to automatically move the necessary files into your current theme.
Click the button below to start the process.
Move Template Files
Click on 「Move Template Files」 link
Templates moved successfully!
Great news! BuddyPress templates are now in the correct position in your theme, which means that we can skip Step Two: Moving Templates Manually, and move directly to Step Three. Cool!
Continue to Step Three.
Click on 「move on to step three」 link
Step Three: Tweaking your layout
Now that the template files are in the correct location, check out your site. (You can come back to the current page at any time, by visiting Dashboard > Appearance > BP Compatibility.) You should see a BuddyPress admin bar at the top of the page. Try visiting some of the links in the 「My Account」 menu. If everything has gone right up to this point, you should be able to see your BuddyPress content.
If you find that the pages are not quite aligned correctly, or the content is overlapping the sidebar, you may need to tweak the template HTML. Please follow the 「fixing alignment」 instructions below. If the content in your pages is aligned to your satisfaction, then you can skip to the 「Finishing Up」 section at the bottom of this page.
Fixing Alignment
By default BuddyPress templates use this HTML structure:
[ CONTENT ]
If BuddyPress pages are not aligned correctly, then you may need to modify some of the templates to match your theme』s HTML structure. The best way to do this is to access your theme』s files, via FTP, at:
/xxxxx/wp-content/themes/twentyeleven/
Open up the page.php file (if this does not exist, use index.php) of your active/preferred WP theme. Make note of the HTML template structure of the file, specifically the div tags that surround the content and sidebar.
There are two methods for making the necessary template changes.
A. The first method is to change the HTML structure in the following BuddyPress template files which were transferred into your active/preferred WP theme to match the structure of your WP theme』s page.php or index.php file.
/activity/index.php
/blogs/create.php
/blogs/index.php
/forums/index.php
/groups/index.php
/groups/create.php
/groups/single/home.php
/groups/single/plugins.php
/members/index.php
/members/single/home.php
/members/single/plugins.php
/members/single/settings/delete-account.php
/members/single/settings/general.php
/members/single/settings/notifications.php
/registration/activate.php
/registration/register.php
B. Alternatively, you may find it easier to make copies of your theme』s header.php, sidebar.php and footer.php and rename them to header-buddypress.php, sidebar-buddypress.php, and footer-buddypress.php.
Then you can alter the structure of these new template files (header-buddypress.php, sidebar-buddypress.php, and footer-buddypress.php) to resemble your theme』s page.php (or index.php).
Once you are done matching up the HTML structure of your theme in these template files, please take another look through your site. You should find that BuddyPress pages now fit inside the content structure of your theme.
Finishing Up
You』re now all done with the conversion process. Your WordPress theme will now happily provide BuddyPress compatibility support. Once you hit the finish button you will be presented with a new permanent theme options page, which will allow you to tweak some settings.
Finish
Click on 「Finish」 link
Final Steps
__Disable BP Template Pack CSS
The BuddyPress template pack comes with basic wireframe CSS styles that will format the layout of BuddyPress pages. You can extend upon these styles in your theme』s CSS file, or simply turn them off and build your own styles.
___Disable BP Template Pack JS / AJAX
The BuddyPress template pack will automatically integrate the BuddyPress default theme javascript and AJAX functionality into your theme. You can switch this off, however the experience will be somewhat degraded.
Save Settings
NOTE: To remove the 「BuddyPress is ready」 message you will need to add a 「buddypress」 tag to your theme. You can do this by editing the style.css file of your active theme and adding the tag to the 「Tags:」 line in the comment header.
Navigation Links
You may want to add new navigation tabs or links to your theme to link to BuddyPress directory pages. The default set of links are:
Activity: http://yoursite.com/activity/
Members: http://yoursite.com/members/
Groups: http://yoursite.com/groups/
Forums: http://yoursite.com/forums/
Register: http://yoursite.com/register/ (registration must be enabled)
Blogs: http://yoursite.com/blogs/
Reset Setup
If you would like to run through the setup process again please use the reset button (you will start at step three if you haven』t removed the template files):
Reset
Template-Packed WordPress Themes
Default WordPress Themes
Twenty Eleven Theme – BuddyPress Codex Walkthrough, BP 1.5, using second method
Twenty Ten Theme – BuddyPress Codex Walkthrough, BP 1.5, using second method
WordPress Themes Repository
Admire Theme – TBA
Admired Theme – http://wp.me/p1I84P-1l
Adventure Journal Theme – BuddyPress Forums
Atahualpa Theme – BuddyPress Forums
anIMass Theme – BuddyPress Forums
Canyon Theme – BuddyPress Forums
Catch Box Theme – BuddyPress Forums
DailyPost Theme – BuddyPress Forums
Delicate Theme – BuddyPress Forums
Easel Theme – http://wp.me/p1I84P-1y
Esplanade Theme – http://wp.me/p1I84P-31
Graphene Theme – BuddyPress Forums
iFeature Free – BuddyPress Forums
Mammoth Theme – BuddyPress Forums
Mantra Theme – BuddyPress Forums
Minimatica Theme – BuddyPress Forums
Motion Theme – BuddyPress Codex Walkthrough, first method
Mystique Theme – BuddyPress Forums
Pinboard Theme – http://wp.me/p1I84P-V
Platform Theme – BuddyPress Forums
PulsePress Theme – http://wp.me/p1I84P-3t
Sliding Door Theme – BuddyPress Forums
Thematic Child Theme – BuddyPress Forums
TP Sunrise Theme – BuddyPress Forums
Wallow Theme – http://wp.me/p1I84P-3x
Weaver Theme – BuddyPress Forums
WP Creativix Theme – BuddyPress Forums
Yoko Theme – http://wp.me/p1I84P-3b
Other WordPress Themes
13th Floor, Elegant Themes – BuddyPress Forums
Aggregate Theme, Elegant Themes – BuddyPress Forums
Alyeska Theme, Themeforest – BuddyPress Forums
Amplifier Theme, Themeforest – BuddyPress Forums
Artisteer Theme, Artisteer – BuddyPress Forums
Avenue Theme, Themeforest – http://wp.me/p1I84P-3J
Backstreet Theme, Themeforest – http://wp.me/p1I84P-1p
Basic Theme, Elegant Themes – http://wp.me/p1I84P-1u
BlackLight Theme, Theme Junkie – BuddyPress Forums
Blogging News Theme, Colorlabs – BuddyPress Forums
Bold Theme, Solostream – BuddyPress Forums
Boulevard Theme, Themeforest – BuddyPress Forums
Canvas Child Theme, Wootheme – BuddyPress Forums
Canyon Theme, Themeforest – BuddyPress Forums
CelebrityPress Theme, Gorilla Themes – http://wp.me/p1I84P-3z
Chameleon Theme, Elegant Themes – http://wp.me/p1I84P-3L
Collection Theme, Theme Junkie – http://wp.me/p1I84P-1B
Complete Theme, WP Explorer – http://wp.me/p1I84P-1n
Continuum Theme, Themeforest – http://wp.me/p1I84P-36
Delicious Magazine Theme, Woothemes – BuddyPress Forums
Denizen Theme, Themeforest – BuddyPress Forums
Diner Theme, Woothemes – BuddyPress Forums
Duotive Three, Themeforest – BuddyPress Forums
Eclipse Theme, Themeforest – http://wp.me/p1I84P-1g
eNews Theme, Elegant Themes – BuddyPress Forums
Envision Theme, Themefuse – BuddyPress Forums
Evolution Theme, Elegant Themes – BuddyPress Forums
Facepress Theme, Themeforest – http://wp.me/p1I84P-O
Flare Theme, Themeforest – http://wp.me/p1I84P-2P
Fullscreen Business Portfolio Theme, Themeforest – BuddyPress Forums
Gonzo Theme, Themeforest – http://wp.me/p1I84P-K
Harmony Theme, Elegrant Themes – http://wp.me/p1I84P-3R
iFeature4 Pro, Cyberchimps – BuddyPress Forums
Insignio Portfolio Theme, Themeforest – BuddyPress Forums: two columns, full width
InStyle Theme, Elegant Themes – old version at and Version 2.7 at http://wp.me/p1I84P-3H
Karma Theme, Themeforest – BuddyPress Forums
Listings, Woothemes – BuddyPress Forums
Lucid Theme, Elegant Themes – http://wp.me/p1I84P-E
Memo Theme, Premium Pixels – BuddyPress Forums
Merchant Theme, Themeforest – http://wp.me/p1I84P-1b
Metrolo Theme, ThemeState – BuddyPress Forums
Minimosity Theme, Themeforest – http://wp.me/p1I84P-2X
Modernize Theme, Themeforest – http://wp.me/p1I84P-1J
Music Theme, Netlabs – http://wp.me/p1I84P-18
MusicLife Theme, Fthemes – http://wp.me/p1I84P-1D
Neu Theme, ColorLabs – BuddyPress Forums
Nevada Theme, Themeforest – http://wp.me/p1I84P-34
Paradise Theme, Themeforest – http://wp.me/p1I84P-3r
Peekaboo Theme, Themeforest – BuddyPress Forums
Professional Theme, Elegant Themes – BuddyPress Forums
Puretype Theme, Elegant Themes – BuddyPress Forums
Quik Gallery, WP Explorer – BuddyPress Forums
Quickstart Theme, Gabfire – BuddyPress Forums
Ray of Light Theme, Themeforest – BuddyPress Forums
Reaction Theme, Themeforest – BuddyPress Forums
Risen Theme, Themeforest – BuddyPress Forums
Sahifa Theme, Themeforest – http://wp.me/p1I84P-3m
Shoutbox Theme, Themeforest – BuddyPress Forums
Simpfolio Theme, Slimmity – http://wp.me/p1I84P-3i
Smileth Theme, MyReviewPlugin – BuddyPress Forums
SMPL Theme, Woothemes – BuddyPress Forums
Sportsmag, Magazine3 – http://wp.me/p1I84P-3f
Strings Theme, Themeforest – http://wp.me/p1I84P-3o
Swagger Theme, Themeforest – http://wp.me/p1I84P-1F
Swatch Theme, Woothemes – BuddyPress Forums
Telegraph Theme, WPZoom – BuddyPress Forums
The Morning After Theme, Woothemes – http://wp.me/p1I84P-2Z
The Secret World Theme – http://wp.me/p1I84P-3F
The Source Theme, Elegant Themes – BuddyPress Forums
TheStyle Theme, Elegant Themes – BuddyPress Forums
Unstandard Theme, Themetie – BuddyPress Forums
Vagenta Theme, Themeforest – http://wp.me/p1I84P-2M
Volt Theme, Themeforest – http://wp.me/p1I84P-3k
Wallbase Theme, Web2Feel – BuddyPress Forums
Wikeasi Theme, WooThemes – BuddyPress Forums
Wisdom of Life Theme, Themeforest – http://wp.me/p1I84P-15
Wowway Theme, Themeforest – http://wp.me/p1I84P-38D
WP Bold, Solostream (partial – registration only) – http://wp.me/p1I84P-2U
WP Chatter Theme, Solostream – BuddyPress Forums
WP Church Theme, Themeforest – BuddyPress Forums
WP Clear Theme, Solostream – BuddyPress Forums
WP ClearPhoto Theme, Solostream – BuddyPress Forums
WP ClearVideo Theme, Solostream – BuddyPress Forums
WP DaVinci Theme, Solostream – http://wp.me/p1I84P-1H
WP Flexishop Theme, Themeforest – BuddyPress Forums
WordPress Theme 778, Template-help.com – BuddyPress Forums
yserif Theme, Yoarts.com – BuddyPress Forums
將 1.0 主題升級到 1.1
Codex Home → Legacy Docs → Archived Section: Theme Development → Upgrading a 1.0 Theme to 1.1
Upgrading a 1.0 Theme to 1.1
Archived file. Good up to BP 1.1
Starting at version 1.1, BuddyPress themes are simply WordPress themes with extra template files. The separation between a WordPress (old bphome) and BuddyPress (old bpmember) theme has been removed. All theme files are contained in the same theme and one theme design applies to the site as a whole.
This guide will help those people who have built custom themes for BuddyPress 1.0 transition to the new theme setup.
How you approach upgrading your theme really depends on your setup in BuddyPress 1.0. Please choose the section that best describes your situation and follow those instructions only.
These help guides make the assumption that you have copied the new 1.1 default themes (/plugins/buddypress/bp-themes/bp-sn-parent/ and /plugins/buddypress/bp-themes/bp-default/ into the /wp-content/themes/ directory.
「I』ve used the old default themes, but modified the layout/colors」
Duplicate /wp-content/themes/bp-default/ and give it a new unique name.
In your new duplicated default theme, inside the _inc/css folder create a file called 「custom.css」
Copy the custom CSS from both your old bphome and bpmember theme into this file and save the file.
Open up style.css in the root of your duplicated default theme.
Edit the 「Theme Name」 at the top of the style.css file and give it a unique name.
The last line of style.css is: /* @import url( _inc/css/custom.css ); */. Remove the starting /* and the ending */ on that line. Save the file.
Make sure you have backed up your 「/wp-content/bp-themes/」 directory, then delete it.
Log in as an admin and head to /wp-admin/ on your root blog.
Under 「Site Admin > Themes」, select 「yes」 next to the theme with the custom name you just entered into style.css
Under 「Appearance > Themes」 activate the theme for the root blog.
You should now be using the new one theme system with your design customizations.
「I』ve used a WordPress theme for my blog with the default BuddyPress member theme」
In BuddyPress 1.0 you could use a WordPress theme that was completely separate from your BuddyPress theme design. More often than not the BuddyPress theme would not get updated to match the WordPress theme design in use. This made the overall experience clunky.
With BuddyPress 1.1 you can integrate BuddyPress templates with your WordPress theme design. One thing to be aware of before taking this route is that WordPress themes only contain layout styles for blog pages – they are not built for the extra features BuddyPress provides. You will have to add custom CSS to your WordPress templates to handle the layout for the BuddyPress pages.
Duplicate your existing WordPress theme so you have a backup.
Open up the folder /wp-content/themes/bp-sn-parent/ and copy every folder and the following files 「optionsbar.php」, 「userbar.php」 and 「plugin-template.php」. Paste these folders and files into your active WordPress theme.
You will now need to make an edit:
Open up header.php and add the following lines (usually at the bottom inside of a content or container div, not inside the header div):
?123456&amp;lt;?php if ( !bp_is_blog_page() &amp;amp;&amp;amp; !bp_is_directory() &amp;amp;&amp;amp; !bp_is_register_page() &amp;amp;&amp;amp; !bp_is_activation_page() ) : ?&amp;gt; &amp;lt;?php locate_template( array( 'userbar.php' ), true ) ?&amp;gt;&amp;lt;?php locate_template( array( 'optionsbar.php' ), true ) ?&amp;gt; &amp;lt;?php endif; ?&amp;gt;
Save the header.php file.
Make sure you have backed up your 「/wp-content/bp-themes/」 directory (this is important for the last step), then delete it.
You should now be able to visit your site and BuddyPress URL』s and find that the BuddyPress pages will work with your general site design and header/footer. You will however find that BuddyPress pages are generally not presented correctly.
You can try including the components.css file from the BuddyPress parent theme to add layout styles to BuddyPress pages. Open up your WordPress theme』s style.css file. Add the following line below the comment header:@import url( ../bp-sn-parent/_inc/css/components.css )
You should now see basic layout styles for BuddyPress pages within your WordPress theme. You will likely still need to perform some cleanup to get things working completely seamlessly.
If you find that your WordPress theme is not being co-operative, you can install BuddyPress on a secondary blog giving you the option to theme BuddyPress differently than your root blog.
Full instructions to do this can be found here:
https://codex.buddypress.org/how-to-guides/install-buddypress-on-a-secondary-blog/
「I』ve built a completely custom WordPress theme and BuddyPress theme」
Not a problem, in your case you need to merge the two into one single WordPress theme.
It should be as simple as copying all of the templates from the BuddyPress theme and pasting them into the WordPress theme. Be sure to copy and paste over all of the CSS from the BuddyPress theme also.
Once you are done, backup your /wp-content/bp-themes/ directory and remove it. This will allow the new integrated theme to work.
p
檢查 BuddyPress
Codex Home → BuddyPress Plugin Development → Checking For BuddyPress
Checking For BuddyPress
Because of the way that WordPress loads plugins, it』s possible that your plugin could load before or after BuddyPress. This makes it difficult to know if BuddyPress is loaded, or if your plugin has the proper functions available that it might need. If you don』t check, and assume BuddyPress is loaded, it could take an entire site down when BuddyPress is upgraded.
It』s really easy to do this. In your plugin, create a loader.php file that will check to see if BuddyPress is active, and only then load code that relies on BP:
?12345678910111213141516171819/*Plugin Name: My PluginPlugin URI: http://example.org/my-plugin/Description: My BuddyPress pluginVersion: 1.0Requires at least: WordPress 2.9.1 / BuddyPress 1.2Tested up to: WordPress 2.9.1 / BuddyPress 1.2License: GNU/GPL 2Author: Some PersonAuthor URI: http://example.org/me/*/ /* Only load code that needs BuddyPress to run once BP is loaded and initialized. */function my_plugin_init() { require( dirname( __FILE__ ) . '/my-plugin.php' );}add_action( 'bp_include', 'my_plugin_init' ); /* If you have code that does not need BuddyPress to run, then add it here. */