Action Hooks Reference

This page lists every bisteinoff_* action the theme fires with do_action(). For how to attach callbacks from a child theme, see Using Theme Hooks. Filters are listed separately: Filter Hooks Reference.

Unless noted, the parent theme already prints default output on the hook. Layout hooks named before_* / after_* are usually empty aside from Bootstrap wrappers on some loops — they are the easiest place to inject markup.

Document head and header

Fired from header.php.

HookArgumentsDefault callbackWhat it does
bisteinoff_opengraph_atts—SEO: Open Graph prefix on <html>Runs inside the <html> tag. Do not echo a full tag; only extra attributes.
bisteinoff_embedstring $locationEmbed: prints Website Settings → Embed for that locationLocations used by the theme: 'head' (in <head>), 'body' (right after <body>), 'footer' (before </body>), 'google_fonts' (from the fonts loader). Output is passed through the bisteinoff_embed_html filter (Cookie Consent uses this).
bisteinoff_seo—SEO: title, description, robots, Open Graph tagsInside <head>, before wp_head(). Disabled when BISTEINOFF_THEME_OPTIONS_SEO is false.
bisteinoff_classstring $locationMarkupBuilder: echoes extra CSS classesUsed asclass="" on <header> and 'footer' on <footer>. Echo space-separated class names only, not a class attribute.
bisteinoff_logostring $locationLogo renderer'header' uses unprefixed options (logo, logo_title, …). Other locations use a prefix, e.g. footer_logo. Also used on the maintenance screen as 'footer'.
bisteinoff_navstring|array $typeNav renderer; multilingual switcher when enabledSee the Navigation section below.
bisteinoff_contactstring $locationContact block (requires Bisteinoff Global Contact Manager)'header', 'hamburger', 'footer'.
bisteinoff_ctastring $locationHeader CTA button from Website Settings'horizontal' (desktop header), 'hamburger' (off-canvas). Wrapper and link classes are filterable.

Navigation

bisteinoff_nav accepts a string, or [ 'footer', '1' ] … '4' for the four footer columns.

$typeWhereNotes
'horizontal'HeaderPrimary bar. Hidden on small screens depending on the header menu option.
'hamburger'HeaderOff-canvas menu. Renders template-parts/nav-hamburger.php.
'woo-cart'HeaderOnly if WooCommerce is active, cart is not disabled, and the view is not cart/checkout.
'languages'HeaderLanguage switcher. Requires multilingual mode.
[ 'footer', n ]Footer columns 1–4n is '1', '2', '3', or '4'.
'footer_languages'Copyright barFooter language switcher.
'copyright'Copyright barSecondary footer menu.

Inside the hamburger template:

HookArgumentsWhen
bisteinoff_nav_hamburger_before_title—Off-canvas header, before the menu title
bisteinoff_nav_hamburger_after_title—After the menu title, before the close button
bisteinoff_nav_beforestring $typeBefore the wp_nav_menu() list. Header horizontal nav also fires this with 'horizontal'.
bisteinoff_nav_afterstring $typeAfter the menu list
bisteinoff_nav_footerstring $typeBottom of the off-canvas panel ('hamburger')

Footer

Fired from footer.php unless noted.

HookArgumentsDefault callbackWhat it does
bisteinoff_footer_wrapper_before—Opens a background-image wrapper when a footer image is set (priority 10)Safe to add content after priority 10 if you need to sit inside that wrapper.
bisteinoff_socialsstring $locationPrints selected networks for that locationFooter uses 'footer'. Reads the {location}_socials option.
bisteinoff_footer_note—Optional note from Website Settings → FooterColumn 4, under socials.
bisteinoff_copyright—© year range, site name, attributionAlso used on the maintenance screen.
bisteinoff_footer_wrapper_after—Closes the background wrapper (priority 90)Run before 90 to stay inside the wrapper, after 90 to sit outside it.

Shared content chrome

Used on pages, posts, archives, search, 404, gallery, contact, testimonials, and similar templates.

HookArgumentsDefault callbackWhat it does
bisteinoff_content_data—Echoes data attributes on <main id="content">Called inside the opening <main> tag. Echo attributes only.
bisteinoff_title—SEO heading (H1 text for the view)Used in page headers, WooCommerce archive/product titles, related-article cards.
bisteinoff_breadcrumbs—Breadcrumb nav (skipped on front page and maintenance)Trail is filterable via bisteinoff_breadcrumb_items.

Pages

Templates: page.php, contact-page.php, gallery-page.php, testimonials-page.php (same layout hooks).

HookTypical use
bisteinoff_before_page_contentAbove the page header, inside <main>
bisteinoff_after_page_headerBetween header (title/breadcrumbs) and the content loop. Not fired on contact/gallery/testimonials templates that skip this slot.
bisteinoff_before_page_loopBefore the_content(). Parent opens a Bootstrap container here when the page builder is off (priority 0).
bisteinoff_after_page_loopAfter the loop. Parent closes the container (priority 100).
bisteinoff_after_page_contentEnd of <main>

Contact page extras (only on contact-page.php):

HookArgumentsWhat it does
bisteinoff_contact_itemsint $post_idContact list chosen on that page (plugin required)
bisteinoff_contact_mapint $post_idMap embed from post meta _bst_contact_map (no plugin required)

Landing pages and front page

page-landing.php (no header chrome):

  • bisteinoff_before_lp_page_content
  • bisteinoff_before_lp_page_loop / bisteinoff_after_lp_page_loop
  • bisteinoff_after_lp_page_content

front-page.php:

HookWhen it runs
bisteinoff_before_frontpage_contentAlways, after <main> opens
bisteinoff_before_frontpage_loop / bisteinoff_after_frontpage_loopWhen the front page is a posts blog. Parent adds a container (priorities 0 and 100) if the builder is off.
bisteinoff_frontpage_contentWhen the front page is not a posts loop (static front page / no posts). Nothing is hooked by default — attach your own output, or let the page builder fill the page.
bisteinoff_after_frontpage_contentAlways, before <main> closes

Archives, search, 404

archive.php and taxonomy-testimonials_category.php:

  • bisteinoff_before_archive_content
  • bisteinoff_after_archive_header
  • bisteinoff_before_archive_loop / bisteinoff_after_archive_loop
  • bisteinoff_after_archive_content

search.php: bisteinoff_before_search_results / bisteinoff_after_search_results around the results list.

index.php and 404.php use the shared chrome only (bisteinoff_content_data, bisteinoff_title, bisteinoff_breadcrumbs).

Single posts

Template: template-parts/content-single.php.

HookArgumentsWhat it does
bisteinoff_before_single_content—Top of the article, inside <main>
bisteinoff_after_single_header—After title, breadcrumbs, and date
bisteinoff_single_metastring $type, array $args = []Prints one meta line. Types: 'date', 'time' (reading time), 'category', 'tag'. For 'category', $args may include primary and secondary (both default true). Also used on cards and in the Posts builder component.
bisteinoff_share—Share buttons from Website Settings
bisteinoff_after_single_content—After the article body
bisteinoff_before_single_comments / bisteinoff_after_single_comments—Around comments
bisteinoff_related_articles—Related posts block
bisteinoff_related_articles_carousel_attributes—Echoes carousel data-* attributes on the related-articles wrapper

Testimonials

HookArgumentsWhat it does
bisteinoff_testimonial_formstring $location'modal' prints a button that opens the form modal. 'below' prints the inline form. Only the location that matches Testimonials Settings → form display mode actually outputs anything.
bisteinoff_testimonialstring $type, array $args = []Field of the current testimonial. Types: 'name', 'city', 'photo', 'date', 'rating', 'media', 'user' (photo + name + city). $args['context'] is 'card' or 'single'. $args['post_id'] optional.

Ads

bisteinoff_ad — argument int $location (1-based slot). The parent theme listens to this action but does not fire it in its templates. Call it from a child template or from another layout hook. Slot count follows BISTEINOFF_THEME_OPTIONS_ADS (see Theme Constants).

add_action( 'bisteinoff_after_archive_header', function (): void {
    echo '<div class="container-fluid">';
    do_action( 'bisteinoff_ad', 1 );
    echo '</div>';
} );

WooCommerce

HookWhere
bisteinoff_before_woo_contentInside <main>, before the shop/product container
bisteinoff_after_woo_contentAfter the container, still inside <main>
bisteinoff_before_woo_product_gallery / bisteinoff_after_woo_product_gallerySingle product image template

Shop and product titles still use bisteinoff_title and bisteinoff_breadcrumbs.

After saving options

When an options panel is saved, the theme fires:

do_action( 'bisteinoff_after_save_{$option_name}', array $old, array $output, array $input )

Known $option_name values:

  • bisteinoff_theme_options — Website Settings
  • bisteinoff_theme_design — Design Settings
  • bisteinoff_language_settings — Languages
  • bisteinoff_testimonials_settings — Testimonials Settings
  • bisteinoff_cookie_consent — Cookie Settings

Use this for side effects (flush rewrite rules, rebuild a cache). Do not echo HTML here.

add_action( 'bisteinoff_after_save_bisteinoff_theme_options', function ( array $old, array $output, array $input ): void {
    if ( ( $old['some_slug'] ?? '' ) !== ( $output['some_slug'] ?? '' ) ) {
        flush_rewrite_rules( false );
    }
}, 10, 3 );

Admin metabox wrappers

Each metabox template fires:

  • bisteinoff_admin_{$id}_metabox_before
  • bisteinoff_admin_{$id}_metabox_after

Ids used by the parent theme: bst_page (template settings), bst_contact, bst_seo, bst_feature, bst_slide, bst_testimonial, bst_cookie.

The SEO module already hooks bisteinoff_admin_bst_seo_metabox_before and …_after for the tags preview and placeholders widget.

Copy-paste map: a typical page

Order inside page.php:

  1. bisteinoff_content_data (on <main>)
  2. bisteinoff_before_page_content
  3. Header: bisteinoff_title, bisteinoff_breadcrumbs
  4. bisteinoff_after_page_header
  5. bisteinoff_before_page_loop → the_content() → bisteinoff_after_page_loop
  6. bisteinoff_after_page_content
Scroll To Top