Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Don’t Inherit BP-Default CSS Child Theme

@bollocks187

Member

All, can we start this again for my clarity. This is what I do to get started playing with Buddypress.

1) Create under WP themes a folder e.g. bbexample

2) Go to WP plugins find, buddypress folder, bp_themes folder and then select the bp_default folder

3) Select and copy ALL the contents in the bp_default folder. The Codex talks about certain things but I copy everything, so I can play with the PHP files in some of the subfolders.

4) Go back to bbexample theme folder under WP content (which is currently empty)

5) Paste everything you copied in 3)

6) Now you have a populated theme with lots of stuff in the folder. Yeah baby !

7) First open the style.css in bbexample

8) Replace ALL the contents with the following:

/*
Theme Name: bbexample
Theme URI: http://blahblah
Description: My theme for BuddyPress.
Version: 1.0
Author: PJ Bollocks
Author URI: http://blahblah.org/
Template: bp-default
Tags: buddypress, two-column, grey, dark
*/

/***
* The following imported file is my personal copy of the bp_default style sheet and is located in my theme area
*/
@import url( _inc/css/default.css );

/**
* Any other additional CSS style information can be placed below:
**/

8) Save the style.css

9) Open the functions.php file to load up your theme styles and essentially kick out the bp_default theme.

10) Replace the contents inside the php delimeters with the following as stated by previous BB players:

if ( !function_exists( ‘bp_dtheme_enqueue_styles’ ) ) :
function bp_dtheme_enqueue_styles() {
// Bump this when changes are made to bust cache
$version = ‘20111102’;
// Register main stylesheet
wp_register_style( ‘bbexample’, get_stylesheet_directory_uri() . ‘/style.css’, array(), $version );
// Enqueue main stylesheet
wp_enqueue_style( ‘bbexample’ );
}
add_action( ‘wp_print_styles’, ‘bp_dtheme_enqueue_styles’ );
endif;

11) Now you have a fully functional BuddyPress compatible theme (based on bb_default), but this is now yours to edit and play with as you see fit.

12) Load the theme and check it out. It looks and performs identical to bp-default and it should since it is your copy.

13) To Edit the CSS then you open the file under bbexample/_inc/default.css

14) You can “Modify” the Theme layout, adding widgets etc, changing the page layouts and modifying some of the PHP display contents by finding the right file under bbexample folders.

Warning: disclaimer: I am a hack and Luv it

Skip to toolbar