Developer Guide
BuddyPress Business Profile overviewPremiumGet BuddyPress Business Profile →
Reference for extending BuddyPress Business Profile. Symbols listed here are present in the shipping code.
Architecture
Section titled “Architecture”Each business is a public custom post type (business) paired one-to-one with a hidden BuddyPress group. The pairing drives the social features:
Business post (CPT: business) post meta: bp-business-group -> BuddyPress group (hidden) group meta: bp-group-business -> back to the business post- Following a business = membership of its group.
- Team members = group admins and moderators.
- Business activity = activity linked to the group.
Business details (contact, hours, services, social links, action button) are stored as post meta on the business, not as BuddyPress xProfile fields.
There are no REST API routes and no cron events in this plugin.
Post Type and Taxonomies
Section titled “Post Type and Taxonomies”- Post type:
business(public, has archive, supports title, editor, author, thumbnail, excerpt). - Taxonomies:
business-category(hierarchical) andbusiness-type(non-hierarchical).
Key Meta Keys
Section titled “Key Meta Keys”| Meta key | On | Purpose |
|---|---|---|
bp-business-group |
business post | Linked BuddyPress group ID |
bp-group-business |
group | Linked business post ID |
_business_action-button |
business post | Selected action-button type |
_business_action-button_{type} |
business post | Value for the selected action |
_Organizer_id |
business post | The Events Calendar organizer ID |
_company_space |
job listing | Links a WP Job Manager job to a business |
Read the linked group ID through the canonical accessor rather than get_post_meta() directly:
$group_id = bp_business_profile_get_group_id( $business_id );Settings Options
Section titled “Settings Options”Settings are stored as these options (arrays):
bp_business_profile_general_settingsbp_business_profile_business_view_settingsbp_business_profile_map_settingsbp_business_profile_reviewbp_business_member_accessbp_business_taxonomy_filterbp_business_integration
Filters
Section titled “Filters”// Group visibility for a business's backing group (default: hidden)add_filter( 'bp_business_profile_group_status', function ( $status, $business_id, $user_id ) { return 'hidden'; // 'public' | 'private' | 'hidden'}, 10, 3 );
// Post status for a newly created business (e.g. require approval)add_filter( 'bp_business_publish_post_status', function ( $status ) { return 'pending';} );
// Modify the create-a-business wizard stepsadd_filter( 'bp_business_profile_creation_steps', function ( $steps ) { return $steps;} );
// Override where a template file is locatedadd_filter( 'bp_business_profile_locate_template', function ( $path, $file_name ) { return $path;}, 10, 2 );
// Adjust action-button labelsadd_filter( 'bp_business_profile_action_label', function ( $labels ) { return $labels;} );
// Adjust the list of social networksadd_filter( 'bp_business_profile_social_network', function ( $networks ) { return $networks;} );
// Filter business description / services outputadd_filter( 'bp_business_profile_filter_content', function ( $content ) { return $content;} );
// Integration tab sidebarsadd_filter( 'bp_business_profile_product_show_sidebar', '__return_false' );add_filter( 'bp_business_profile_events_show_sidebar', '__return_false' );add_filter( 'bp_business_profile_myjobs_show_sidebar', '__return_false' );
// Show product pagination once a business has more than N products (default 20)add_filter( 'bp_business_profile_min_products_pagination', function ( $min ) { return 10;} );
// Members per page in the team inbox (default 20)add_filter( 'bp_business_profile_inbox_per_page', function ( $per_page, $business_id ) { return 30;}, 10, 2 );
// Latest messages shown in a business conversation (default 50)add_filter( 'bp_business_profile_conversation_limit', function ( $limit, $thread_id ) { return 100;}, 10, 2 );
// Attach your own activity to a business so it reads and is labelled as the business'sadd_filter( 'bp_business_profile_activity_business_id', function ( $business_id, $activity ) { if ( 'my_plugin_update' === $activity->type ) { $business_id = (int) bp_activity_get_meta( $activity->id, 'my_business_id', true ); } return $business_id;}, 10, 2 );
// Where a member goes when they open a tab hidden from them (default: business home).// Logged-out visitors are always sent to log in first.add_filter( 'bp_business_profile_hidden_tab_redirect', function ( $url, $endpoint ) { return $url;}, 10, 2 );Actions
Section titled “Actions”// After a business is created or saveddo_action( 'bp_business_profile_after_save_business', $business_id );
// Around the single-business headerdo_action( 'bp_before_business_header' );do_action( 'bp_after_business_header' );
// After a review is saved (custom review data)do_action( 'bp_business_profile_review_custom_data', $data );
// After a business's MediaPress gallery is createddo_action( 'bp_business_profile_media_gallery_created', $gallery_id, $business_id );Helper Functions
Section titled “Helper Functions”Public functions you can call from your own code:
| Function | Returns |
|---|---|
bp_business_profile_get_group_id( $business_id ) |
The business’s backing BuddyPress group ID |
bp_business_profile_is_inbox_team( $business_id, $user_id ) |
Whether the user answers the business’s messages (owner, admins, moderators) |
bp_business_profile_get_inbox_threads( $business_id, $user_id, $args ) |
Business conversations for a user. $args: search, unread, member (one member’s conversations), by_member (one row per member), per_page, page |
bp_business_profile_inbox_unread_count( $business_id, $user_id ) |
Unread count shown on the Message / Inbox tab |
bp_business_profile_get_activity_business_id( $activity ) |
The business an activity belongs to, or 0 |
bp_business_profile_get_media_gallery_id( $business_id ) |
The business’s MediaPress gallery, created on first use |
bp_business_profile_can_post_jobs_for( $business_id, $user_id ) |
Whether the user may attach WP Job Manager jobs to the business (site admins and the business team) |
bp_business_profile_get_job_business_choices( $user_id ) |
Businesses the user may attach jobs to, as ID => title |
bp_business_is_current_tab( $endpoint ) |
Whether a business tab is the one being viewed |
Member Quota
Section titled “Member Quota”Resolve a member’s allowed business count (respecting profile-type, role, then global limits):
$quota = bp_business_profile_get_user_quota( $user_id );AJAX Actions
Section titled “AJAX Actions”All logged-in AJAX actions use the bp-business-profile-nonce nonce unless noted. Selected actions:
| Action | Purpose |
|---|---|
bp_business_follow |
Follow or unfollow a business |
bp_business_profile_filter |
Directory filter (category, search, view, location) |
business_profile_data_save |
Save business profile fields |
upload_business_avatar / upload_business_cover |
Image uploads |
bp_business_profile_save_reply |
Reply to a review |
bp_business_profile_transfer_ownership |
Transfer ownership (owner only) |
bp_business_profile_export_data |
Export a business as JSON (owner only) |
submit_business_claim / approve_business_claim / reject_business_claim |
Claim workflow (claim nonces; approve/reject require manage_options) |
Database
Section titled “Database”The plugin creates one custom table, {prefix}bp_business_claims, holding claim requests (business ID, user ID, status, reason, contact fields, verification documents, admin notes, and timestamps), with a unique key on business + user + status. Reviews are stored as WordPress comments on the business post.
Template Overrides
Section titled “Template Overrides”Copy a template from the plugin’s templates/ folder into your theme to override it:
theme/bp-business-profile/ business-loop.php business-create.php business-search.php personal-businesses.php (own profile Business tab) members-businesses.php (another member's businesses) members-followed-businesses.php (following tab) single/ about.php services.php business-reviews.php product.php (WooCommerce Shop tab) events.php (Events tab) my-jobs.php (Jobs tab) inbox.php (Message / Inbox tab) conversation.php (one conversation and its reply box) settings/ general-settings.php ...
