Theming for BuddyPress

Preview:

Citation preview

Theming BuddyPressor, How to become history’s awesomest person

WordCamp PhoenixJanuary 29 2011

Boone B Gorges@booneboonebgorges.com

Who is Boone?

Who is Boone?

Who is Boone?

• Philosopher

Who is Boone?

• Philosopher

• Wisconsinite

Who is Boone?

• Philosopher

• Wisconsinite

• Punctual

Who is Boone?

• Philosopher

• Wisconsinite

• Punctual

• BuddyPress committing developer

Who is Boone?

• Philosopher

• Wisconsinite

• Punctual

• BuddyPress committing developer

BuddyPress is gonna getcha

BuddyPress is gonna getcha

• Friends

BuddyPress is gonna getcha

• Friends

• Groups

BuddyPress is gonna getcha

• Friends

• Groups

• Private Messages

BuddyPress is gonna getcha

• Friends

• Groups

• Private Messages

• Forums

BuddyPress is gonna getcha

• Friends

• Groups

• Private Messages

• Forums

• Activity Streams

BuddyPress is gonna getcha

• Friends

• Groups

• Private Messages

• Forums

• Activity Streams

• Profiles

Must avoid

Text

http://www.flickr.com/photos/andidigress/4471100232/

BuddyPress is WordPress

BuddyPress themes are WordPress themes

BuddyPress is WordPress

BuddyPress themes are WordPress themes

(plus some cool stuff)

(plus some extra templates)

Look familiar?404.phparchive.phpattachment.phpcomments.phpfooter.phpfunctions.phpheader.php

index.phplinks.phppage.phpsearch.phpsidebar.phpsingle.phpstyle.css

Look familiar?404.phpactivity/archive.phpattachment.phpblogs/comments.phpfooter.phpforums/functions.phpgroups/header.php

index.phplinks.phpmembers/page.phpregistration/search.phpsidebar.phpsingle.phpstyle.css

Look familiar?index.phplinks.phpmembers/page.phpregistration/search.phpsidebar.phpsingle.phpstyle.css

404.phpactivity/archive.phpattachment.phpblogs/comments.phpfooter.phpforums/functions.phpgroups/header.php

wp-content/themes/[your-bp-theme]/groups

create.phpgroups-loop.phpindex.phpsingle/

wp-content/themes/[your-bp-theme]/groups

create.phpgroups-loop.phpindex.phpsingle/ activity.php

admin.phpforum/forum.phpgroup-header.phphome.phpmembers.phpplugins.phprequest-membership.phpsend-invites.php

wp-content/themes/[your-bp-theme]/groups

create.phpgroups-loop.phpindex.phpsingle/ activity.php

admin.phpforum/forum.phpgroup-header.phphome.phpmembers.phpplugins.phprequest-membership.phpsend-invites.php

edit.phptopic.php

So how do I get started?

1. BuddyPress Template Pack

2. bp-default child theme

3. From scratch

1. BuddyPress Template Packhttp://wordpress.org/extend/plugins/bp-template-pack/

A plugin that adds the necessary template files to your existing theme

1. BuddyPress Template Packhttp://wordpress.org/extend/plugins/bp-template-pack/

A plugin that adds the necessary template files to your existing theme

activity/blogs/forums/groups/members/registration/

2. bp-default child themehttp://codex.buddypress.org/theme-development/building-a-buddypress-child-theme/

• Declare the parent theme in style.css

• Import the parent theme’s stylesheet

• Override the templates you want to replace

/*Theme Name: BP Cha-Ching!Template: bp-defaultTags: buddypress*/

/* Inherit the default theme styles */@import url( ../../plugins/buddypress/bp-themes/bp-default/_inc/css/default.css );

/* Inherit the default theme adminbar styles */@import url( ../../plugins/buddypress/bp-themes/bp-default/_inc/css/adminbar.css );

2. bp-default child themehttp://codex.buddypress.org/theme-development/building-a-buddypress-child-theme/

activity/footer.phpheader.phpindex.phpmembers/

activity-loop.phpindex.php

single/ activity.phphome.phpprofile.php

Directory structure matters!

3. From scratchLike mom used to make

http://codex.buddypress.org/developer-docs/custom-buddypress-loops/

3. From scratchLike mom used to make

bp-activity/bp-activity-templatetags.phpbp-blogs/bp-blogs-templatetags.phpbp-core/bp-core-templatetags.phpbp-forums/bp-forums-templatetags.phpetc

Know your template tags

How do I know?

• Use the BuddyPress Template Pack when...

• you already have a WP theme, and want to add BP functionality

• Build a child theme of bp-default when...

• you want to maximize upgradability

• Build a theme from scratch when...

• you only need a few BP features, and maybe you don’t want it to look like BP at all

Большое срасибо!

Boone B Gorges@booneboonebgorges.com