Reference of the significant action hooks and filters the BuddyX Pro theme fires. Every hook listed here is fired (do_action) or applied (apply_filters) in the shipped 5.1.4 code. Plugin hooks the theme only listens to (core WordPress, BuddyPress, WooCommerce, LearnDash, etc.) are out of scope - see those projects' own references.
BuddyX Pro fires a large surface (roughly 55 own actions and 70 own filters). This page documents the ones you are most likely to hook. Grep the code for do_action( 'buddyx / apply_filters( 'buddyx to see the complete set.
Action Hooks
Document & Body Hooks
Fired from header.php and footer.php.
| Hook |
Fires |
buddyx_head_top |
Immediately inside <head> |
buddyx_head_bottom |
End of <head>, before </head> |
buddyx_body_top |
Right after <body> opens (also fires buddyx_wp_body_open) |
buddyx_page_top |
Top of #page wrapper |
buddyx_page_bottom |
Bottom of #page, before wp_footer() |
buddyx_body_bottom |
After wp_footer(), before </body> |
add_action( 'buddyx_head_bottom', 'my_head_meta' );
function my_head_meta() {
echo '<meta name="theme-color" content="#ee4036">';
}
Header Hooks
Fired from header.php and the header template parts.
| Hook |
Fires |
buddyx_header_before |
Before the <header id="masthead"> element |
buddyx_header_wrapper_before |
Inside the header, before the inner wrapper |
buddyx_header_wrapper_after |
Inside the header, after the inner wrapper |
buddyx_header_after |
After the </header> element |
buddyx_header_actions |
Inside the desktop menu-icons area (search / cart / color-mode toggle) |
buddyx_mobile_menu_actions |
Inside the mobile navigation actions (template-parts/header/navigation.php) |
There is no buddyx_header hook - that name is not fired anywhere in the theme. Use buddyx_header_actions to add header widgets. The Color_Mode_Toggle component hooks its toggle onto buddyx_header_actions at priority 50.
// Add a header widget next to the search / cart icons.
add_action( 'buddyx_header_actions', 'my_header_widget', 20 );
function my_header_widget() {
echo '<div class="my-header-widget">Hi</div>';
}
Content Wrapper Hooks
The most widely used pair - fired around the main content area from every top-level template (index.php, single.php, page.php, archive.php, buddypress.php, bbpress.php, the FluentCart/LearnDash templates, etc.).
| Hook |
Fires |
buddyx_before_content |
Before the content container opens |
buddyx_after_content |
After the content container closes |
add_action( 'buddyx_before_content', 'my_content_notice' );
function my_content_notice() {
echo '<div class="my-notice">Custom content here</div>';
}
Sub-Header Hook
| Hook |
Fires |
buddyx_sub_header |
Page-title / sub-header area, after the site header |
Default callback: buddyx_sub_header().
// Replace the default page header.
remove_action( 'buddyx_sub_header', 'buddyx_sub_header' );
add_action( 'buddyx_sub_header', 'my_page_header' );
function my_page_header() {
echo '<div class="my-page-header">Custom Header</div>';
}
Entry / Loop Hooks
Fired from the template-parts/content/ and template-parts/layout/ parts.
| Hook |
Fires |
buddyx_entry_before |
Before an entry <article> |
buddyx_entry_after |
After an entry <article> |
buddyx_entry_content_before |
Before the entry content |
buddyx_entry_content_after |
After the entry content |
buddyx_entry_meta_after |
After the entry meta row |
buddyx_before_archive_loop |
Before the archive loop starts |
add_action( 'buddyx_entry_content_after', 'my_after_post' );
function my_after_post() {
if ( is_singular( 'post' ) ) {
echo '<div class="author-bio">...</div>';
}
}
Breadcrumb Hooks
| Hook |
Fires |
buddyx_before_breadcrumb |
Before the breadcrumb trail |
buddyx_after_breadcrumb |
After the breadcrumb trail |
Sidebar Hooks
Fired from sidebar.php / sidebar-buddypress.php.
| Hook |
Fires |
buddyx_sidebar_before |
Before the sidebar widget area |
buddyx_sidebar_after |
After the sidebar widget area |
Footer Hooks
Fired from footer.php and template-parts/footer/info.php.
| Hook |
Fires |
buddyx_footer_before |
Before the <footer> element |
buddyx_footer_after |
After the <footer> element |
buddyx_copyright_before |
Before the copyright row |
buddyx_copyright_after |
After the copyright row |
add_action( 'buddyx_footer_before', 'my_prefooter' );
function my_prefooter() {
echo '<div class="pre-footer">Newsletter signup</div>';
}
Side Panel Hooks
Fired from template-parts/header/buddyx-panel.php.
| Hook |
Fires |
buddyx_before_inner_panel |
Before the inner side-panel content |
buddyx_after_inner_panel |
After the inner side-panel content |
Login / Registration Form Hooks
Fired from the login/register form parts.
| Hook |
Fires |
buddyx_login_form_top / buddyx_login_form_bottom |
Top / bottom of the login form |
buddyx_register_form_top / buddyx_register_form_bottom |
Top / bottom of the registration form |
buddyxpro_recaptcha_after_login_form |
After the login form (reCAPTCHA seam) |
buddyxpro_recaptcha_after_register_form |
After the register form (reCAPTCHA seam) |
Comment Hooks
| Hook |
Fires |
Parameters |
buddyx_pro_post_comment_before |
Before the post comments section |
- |
buddyx_pro_before_comment_replay |
Before the comment reply link |
$comment_id, $comment |
buddyx_pro_after_comment_replay |
After the comment reply link |
$comment_id, $comment |
add_action( 'buddyx_pro_after_comment_replay', 'my_comment_actions', 10, 2 );
function my_comment_actions( $comment_id, $comment ) {
echo '<button class="report-comment">Report</button>';
}
BuddyPress Directory Hooks
| Hook |
Fires |
buddyx_before_member_avatar_member_directory |
Before a member avatar in the members directory |
buddyx_before_group_avatar_group_directory |
Before a group avatar in the groups directory |
buddyx_before_item_meta / buddyx_after_item_meta |
Around directory item meta |
buddyx_buddypress_member_send_message_button_call |
Around the member "send message" button |
Store / Marketplace Hooks
Fired from the Dokan store container (inc/compatibility/dokan/dokan-functions.php).
| Hook |
Fires |
buddyx_store_container_open |
Inside the store-page container open |
buddyx_store_container_close |
Inside the store-page container close |
FluentCart Product Hooks
Fired from the FluentCart single-product template (all default priority 10).
| Hook |
Fires |
buddyx_fluentcart_before_product_content / buddyx_fluentcart_after_product_content |
Start / end of the product template |
buddyx_fluentcart_before_product_header / buddyx_fluentcart_after_product_header |
Around product title and meta |
buddyx_fluentcart_before_product_description / buddyx_fluentcart_after_product_description |
Around the product description |
buddyx_fluentcart_product_tabs |
Product tabs area |
buddyx_fluentcart_before_related_products / buddyx_fluentcart_after_related_products |
Around related products |
add_action( 'buddyx_fluentcart_after_product_header', 'my_trust_badges' );
function my_trust_badges() {
echo '<div class="trust-badges">Secure checkout</div>';
}
Filter Hooks
Asset Manifest Filters (primary extension seams)
These are the recommended entry points for adding, removing, or reconfiguring theme assets. See the Theme Architecture asset section.
buddyxpro_css_files
File: inc/Styles/Component.php
Filters the CSS manifest ($handle => $data map) that drives every conditional stylesheet enqueue. Add an entry to register a new integration stylesheet, or unset one to drop it.
add_filter( 'buddyxpro_css_files', function ( $css_files ) {
$css_files['my-integration'] = array(
'file' => 'my-integration.css',
'global' => false,
'preload_callback' => function () {
return class_exists( 'My_Plugin' );
},
'media' => 'all',
'deps' => array(),
'loading' => null,
);
return $css_files;
} );
buddyxpro_js_files
File: inc/Scripts/Component.php
Filters the JavaScript manifest that drives every conditional script enqueue (same shape, with footer / localize keys).
add_filter( 'buddyxpro_js_files', function ( $js_files ) {
unset( $js_files['buddyxpro-entry-share-popup'] ); // drop share popup
return $js_files;
} );
Customizer / Tokens Filters
| Filter |
File |
Purpose |
buddyxpro_customizer_settings |
inc/Customizer_Settings/ |
Filters the full customizer settings definition |
buddyx_customizer_field_type_map |
inc/Customizer_Framework/ |
Maps field type to control class |
buddyx_customizer_field_args |
inc/Customizer_Framework/ |
Filters per-field args before registration |
buddyxpro_color_scheme_presets |
inc/Customizer_Settings/ |
Color-scheme preset list |
buddyxpro_typography_presets |
- |
Typography preset list |
buddyxpro_header_presets |
- |
Header layout presets |
buddyxpro_google_fonts |
inc/Fonts/ |
Available Google font list |
Breadcrumb Filters
| Filter |
Purpose |
buddyx_breadcrumb_trail_args |
Default breadcrumb args |
buddyx_breadcrumb_trail_items |
Final breadcrumb items array |
buddyx_breadcrumb_trail_labels |
Breadcrumb label strings |
buddyx_breadcrumb_trail_object |
Short-circuit with a custom trail object |
buddyx_breadcrumb_trail |
Final rendered breadcrumb HTML |
Search Toggle Filters
| Filter |
Returns |
buddyx_search_slide_toggle_data_attrs |
Data-attribute string for the search toggle button |
buddyx_search_field_toggle_data_attrs |
Data-attribute string for the search field container |
add_filter( 'buddyx_search_slide_toggle_data_attrs', function () {
return 'data-animation="slide" data-speed="300"';
} );
Layout / Content Filters
| Filter |
Purpose |
buddyxpro_minimal_layout_force_no_sidebar |
Force no sidebar in the minimal layout |
buddyxpro_display_title_and_description |
Toggle archive title + description output |
buddyxpro_filter_archive_posts_per_page |
Archive posts-per-page override |
buddyxpro_post_categories_limit |
Max categories shown per entry |
buddyxpro_reading_time_minutes |
Filter the computed reading time |
buddyxpro_page_settings_post_types |
Post types that get the per-page settings meta box |
buddyx_enable_post_thumbnails |
Toggle post-thumbnail support |
buddyx_off_canvas_filter_button_output |
Off-canvas filter button markup |
Login / Register Filters
| Filter |
Purpose |
buddyxpro_login_presets |
Login-page brand presets |
buddyxpro_register_page_login_url |
Register-page login URL |
buddyx_lostpassword_url |
Lost-password URL |
Plugin Installer Filter
| Filter |
Purpose |
buddyxpro_install_catalog |
The recommended-plugins catalog shown by the Plugin Installer / Welcome screen |
BuddyPress / LearnDash Filters
| Filter |
Purpose |
buddyx_bp_is_current_action |
Whether the current BP action matches (used across BP templates) |
buddyx_buddypress_member_send_message_button_url |
Member "send message" button URL |
buddyx_get_member_joined_date |
Member joined-date string |
buddyx_learndash_lms_get_course_participants_per_page |
Participants per page |
buddyx_ld_modify_course_features |
Course features list |
buddyx_ld_filter_course_author_url |
Course author URL |
Adding Hooks From a Component
Theme components add their hooks inside initialize():
namespace BuddyxPro\BuddyxPro\MyComponent;
use BuddyxPro\BuddyxPro\Component_Interface;
class Component implements Component_Interface {
public function get_slug(): string {
return 'my_component';
}
public function initialize() {
add_action( 'wp_head', array( $this, 'add_meta_tags' ) );
add_filter( 'body_class', array( $this, 'add_body_classes' ) );
}
public function add_body_classes( $classes ) {
$classes[] = 'my-custom-class';
return $classes;
}
}
Best Practices
- Use the correct priority (lower = earlier); the color-mode toggle occupies priority 50 on
buddyx_header_actions.
- Check context (
is_singular(), is_page(), is_buddypress()) before outputting.
- Escape all output (
esc_html(), esc_attr(), esc_url()).
- Return a value from filter callbacks - never echo.
- Prefer the
buddyxpro_css_files / buddyxpro_js_files manifest filters over dequeueing by handle where possible.
- Prefix your callbacks so they never collide with the theme's
buddyx_* / buddyxpro_* functions.
Related Documentation