Auto-generated documentation
Complete, up-to-date hook documentation is auto-generated from the code: View BB Theme Hooks For a visual layout of common theme hooks: ProBeaver Hook LayoutAction hooks
Action hooks let you insert custom code at specific points in the theme.Head and body
fl_head_open
Fires after the opening<head> tag.
fl_head
BB Theme’s styles and custom code are loaded afterwp_head to ensure they aren’t overridden by plugins. Use the fl_head action if you need to load something after BB Theme’s styles.
fl_body_open
Fires after the opening<body> tag.
Page structure
fl_page_open
Fires after the openingfl-page <div> tag.
fl_page_close
Fires before the closingfl-page <div> tag.
Top bar hooks
fl_before_top_bar
Fires before the opening top bar<div> tag.
fl_after_top_bar
Fires after the closing top bar<div> tag.
fl_top_bar_col1_open / fl_top_bar_col1_close
Fires at the beginning and end of the first top bar column.fl_top_bar_col2_open / fl_top_bar_col2_close
Fires at the beginning and end of the second top bar column.Header hooks
fl_before_header
Fires before the opening header<div> tag.
fl_after_header
Fires after the closing header<div> tag.
fl_header_content_open / fl_header_content_close
Fires at the beginning and end of the header content section (available in Nav Bottom header layout).Content hooks
fl_before_content
Fires before the opening content<div> tag.
fl_content_open
Fires after the opening content<div> tag.
fl_content_close
Fires before the closing content<div> tag.
fl_after_content
Fires after the closing content<div> tag.
Post hooks
fl_post_top_meta_open / fl_post_top_meta_close
Fires at the beginning and end of the top post meta section.fl_post_bottom_meta_open / fl_post_bottom_meta_close
Fires at the beginning and end of the bottom post meta section.Sidebar hooks
fl_sidebar_open
Fires after the openingfl-sidebar <div> tag.
fl_sidebar_close
Fires before the closingfl-sidebar <div> tag.
Footer hooks
fl_footer_wrap_open
Fires after the opening footer wrap<div> tag.
fl_before_footer_widgets
Fires before the opening footer widgets<div> tag.
fl_after_footer_widgets
Fires after the closing footer widgets<div> tag.
fl_before_footer
Fires before the opening footer<div> tag.
fl_after_footer
Fires after the closing footer<div> tag.
fl_footer_col1_open / fl_footer_col1_close
Fires at the beginning and end of the first footer column.fl_footer_col2_open / fl_footer_col2_close
Fires at the beginning and end of the second footer column.fl_footer_wrap_close
Fires before the closing footer wrap<div> tag.
Comments hooks
fl_comments_open
Fires after the openingfl-comments <div> tag.
fl_comments_close
Fires before the closingfl-comments <div> tag.
Body close
fl_body_close
Fires before the closing</body> tag.
Filter hooks
Filter hooks let you modify theme data and functionality.fl_font_subset
Add subsets to a Google font chosen in the Customizer.fl_topbar_enabled
Override the display of the theme’s top bar. Returnfalse to hide it, true to show it.
fl_fixed_header_enabled
Override the display of the theme’s fixed header.fl_header_enabled
Override the display of the theme’s header.fl_nav_toggle_text
Change the text or icon shown in the mobile nav toggle button.fl_footer_enabled
Override the display of the theme’s footer.fl_social_icons
Change the order of the social icons. The$icons parameter is an array of keys for each icon.
Common use cases
Add Google Analytics
Add tracking code to the head:Add custom copyright text
Add dynamic copyright to footer:Add breadcrumbs
Insert breadcrumbs after header:Conditional header display
Hide header on specific pages:Add custom widget area
Register and display custom widget area:Best practices
Use child theme
Always add hooks in your child theme’sfunctions.php, never in the parent theme.
Check conditions
Use conditional tags to control when hooks fire:Priority and arguments
Understand hook priority and number of arguments:Clean code
- Use proper indentation
- Add comments explaining your code
- Use meaningful function names
- Follow WordPress coding standards
Debugging hooks
Check if hook exists
See all hooked functions
Remove a hooked function
Related resources
Child themes
Learn about creating and using child themes
Developer resources
All BB Theme developer documentation
WordPress Plugin API
Official WordPress hooks documentation
Auto-generated hooks
Complete, up-to-date hook reference