Theme overrides
The plugin ships two front-end surfaces that theme authors can override: the Views sub-tab content and the recent-visitors header strip.
Views sub-tab partials
Section titled “Views sub-tab partials”The sub-tab’s HTML lives in two partials so theme authors can target the active variant without affecting the other:
| Partial | Renders when |
|---|---|
public/partials/bp-profile-views-nouveau-tab-content.php |
BP Nouveau is the active template pack. |
public/partials/bp-profile-views-legacy-tab-content.php |
BP Legacy or older themes. |
How to override
Section titled “How to override”Copy the partial you want to change into your theme:
wp-content/themes/your-theme/buddypress/who-viewed-my-profile/bp-profile-views-nouveau-tab-content.phpThe plugin uses BuddyPress’s standard bp_get_template_part() resolver, so the theme override path takes precedence over the plugin’s own version.
If you need a different fork than the Nouveau-vs-Legacy split that the plugin chooses internally — for example, a fork by member type — filter bp_get_template_part:
add_filter( 'bp_get_template_part', function ( $templates, $slug, $name ) { if ( 'bp-profile-views' === $slug && my_custom_member_type() ) { $templates[] = "buddypress/who-viewed-my-profile/{$slug}-custom.php"; } return $templates;}, 10, 3 );Recent-visitors header strip
Section titled “Recent-visitors header strip”The strip is rendered by Bp_Profile_Views_Public::bp_profile_views_show_my_recent_visitor(). The hook target is chosen at plugin load time based on the active theme:
| Condition | Hook |
|---|---|
show_inside_header_meta = yes |
bp_profile_header_meta |
| Active theme = BuddyX Pro or REIGN | wbtm_after_cover_imager_container |
| Default | bp_after_member_header |
To intercept the strip’s output:
// Run before / after the strip rendersadd_action( 'bp_after_member_header', function () { echo '<div class="my-pre-strip">…</div>';}, 9 );
add_action( 'bp_after_member_header', function () { echo '<div class="my-post-strip">…</div>';}, 11 );To remove the strip without disabling the setting, intercept the hook’s output buffer before and after it fires. remove_action requires the exact object instance that was registered, and the plugin does not expose that instance statically, so the output-buffer approach is the reliable alternative:
// Suppress the strip by capturing and discarding its output.// Priority 9 opens the buffer before the strip (priority 10);// priority 11 closes and discards it.add_action( 'bp_after_member_header', function () { ob_start();}, 9 );
add_action( 'bp_after_member_header', function () { ob_end_clean();}, 11 );If the plugin chose bp_profile_header_meta (when show_inside_header_meta = yes) or wbtm_after_cover_imager_container (BuddyX Pro / REIGN), adjust the hook names in both add_action calls to match.
If you need to conditionally suppress the strip (for example, on a specific page), add your guard inside the priority-9 callback and only call ob_start() when the condition is met. The priority-11 callback should then call ob_get_level() > 0 ? ob_end_clean() : null to avoid closing a buffer it did not open.
CSS overrides
Section titled “CSS overrides”Both surfaces enqueue public/css/bp-profile-views-public.css (or its .min.css / .rtl.css variant). All selectors use generic class names — for example .recent-visitors-container, .recent-visitors-count, .widget_bppv_recent_visitors_widget. To override, target those in your theme stylesheet — no !important should be needed.
JavaScript overrides
Section titled “JavaScript overrides”The Views sub-tab uses Chart.js (vendored at public/js/vendor/chart.min.js) and a thin wrapper at public/js/bp-profile-views-public.js. The wrapper is localized as bp_profile_views_object and listens for change events on the chart filter dropdown.
If you need to swap Chart.js for a different chart library, dequeue the plugin’s script after wp_enqueue_scripts priority 10 and enqueue your own. The DOM contract is a single <canvas> with id bp-profile-views-chart and a JSON payload at window.bp_profile_views_object.

