Filter Hooks References

This page lists every bisteinoff_* filter the theme applies with apply_filters(). Attach a callback with add_filter() from a child theme. For the pattern, see Using Theme Hooks. Actions (markup slots) are listed on Action Hooks Reference.

Every filter must return a value of the same shape it received. Do not echo from a filter.

SEO and URLs

FilterArgumentsDefault / notes
bisteinoff_canonical_urlstring $urlCanonical URL of the current view (Open Graph og:url, share buttons). Return a non-empty string.
bisteinoff_page_seo_tagsarray $seo_tagsStarts empty. If you return a non-empty array, it replaces the theme’s computed tags. Keys: title, description, robots.
bisteinoff_decode_custom_seo_tag_placeholdersstring $text, string $typeRuns before built-in placeholders ({sep}, {site_title}, …). Replace your own tokens here. $type is BISTEINOFF_PAGE_TYPE.
bisteinoff_theme_options_seo_contextsarray $contextsPage-type slugs that get TITLE / description fields in Website Settings → SEO. Default includes page, post, category, post_tag, plus WooCommerce types when WooCommerce is active. search and error404 are always appended after the filter.
bisteinoff_allowed_seo_tag_placeholdersarray $placeholdersPlaceholders that show a “currently set” value in the SEO widget. Default: {sep}, {site_title}, {year}, {year_start}.
bisteinoff_seo_tag_placeholders_dataarray $tagsRows for the SEO placeholders widget. Each item: placeholder (string), source (HTML).
bisteinoff_seo_term_metabox_taxonomiesarray $taxonomiesTaxonomies that get the term SEO metabox.
bisteinoff_seo_taxonomiesarray $taxonomiesLegacy alias applied after the term-metabox list. Prefer bisteinoff_seo_term_metabox_taxonomies.
bisteinoff_breadcrumb_itemsarray $items, string $typeTrail already including Home. Each item is [ 'name' => string, 'url' => string ] (url omitted on the current crumb). Return an empty array to hide breadcrumbs.
bisteinoff_context_labelsarray $labels, string $contextHuman labels for page-type slugs in admin (SEO fields, Gutenberg screens, …). Add a key for any custom context you introduced.
add_filter( 'bisteinoff_canonical_url', function ( string $url ): string {
    if ( is_singular( 'projects' ) ) {
        return home_url( '/portfolio/' . get_post_field( 'post_name' ) . '/' );
    }
    return $url;
} );

add_filter( 'bisteinoff_decode_custom_seo_tag_placeholders', function ( string $text, string $type ): string {
    return str_replace( '{product_count}', (string) wp_count_posts( 'product' )->publish, $text );
}, 10, 2 );

add_filter( 'bisteinoff_breadcrumb_items', function ( array $items, string $type ): array {
    if ( 'contact' === $type ) {
        $items[] = [ 'name' => __( 'Get in touch', 'my-child' ) ];
    }
    return $items;
}, 10, 2 );

Design and front-end components

FilterArgumentsDefault / notes
bisteinoff_design_color_modesarray $modesKeys color and dark. Each value: name, short_name. Add a third mode if you ship extra section backgrounds.
bisteinoff_design_button_typesarray $typesKeys primary, secondary, tertiary. Each value: name, short_name, class (CSS class on the button).
bisteinoff_cta_wrapper_classesstring $classes, string $locationWrapper around the header CTA. Location is horizontal or hamburger.
bisteinoff_cta_link_classesstring $classes, string $locationClasses on the CTA <a> / button.
bisteinoff_modalsarray $modalsModal configs. Each item typically has id, title, subtitle, content, class, sanitize. Testimonials and Cookie Consent already append their modals here.
bisteinoff_icon_setsarray $setsContent icon libraries. Default set key default with label, sprite, manifest paths relative to wp-content/themes/. unset( $sets['default'] ) removes the parent kit.
bisteinoff_socials_configarray $socialsBuilt-in keys: fb, instagram, tiktok, youtube, x, linkedin, github, vk, whatsapp, tg. Shape: name, icon, link, shortcode.
bisteinoff_contact_icon_htmlstring $html, string $typeSVG markup for a contact type (phone, email, …).
bisteinoff_embed_htmlstring $content, string $locationRaw embed HTML just before print. Cookie Consent withholds scripts until the visitor accepts the matching category.
bisteinoff_custom_pagesarray $pagesMap of id → admin label. Defaults: contact, gallery, testimonials. Adding 'quotes' => 'Quotes Page' expects a quotes-page.php template in the child theme.
bisteinoff_maintenance_retry_afterint $secondsRetry-After header while maintenance mode is on. Default 3600.
add_filter( 'bisteinoff_design_button_types', function ( array $types ): array {
    $types['ghost'] = [
        'name'       => __( 'Ghost Button', 'my-child' ),
        'short_name' => _x( 'Ghost', 'button', 'my-child' ),
        'class'      => 'bst-ghost',
    ];
    return $types;
} );

add_filter( 'bisteinoff_icon_sets', function ( array $sets ): array {
    $sets['brand'] = [
        'label'    => __( 'Brand Icons', 'my-child' ),
        'sprite'   => get_stylesheet() . '/assets/icons/sprite.svg',
        'manifest' => get_stylesheet() . '/assets/icons/sprite.json',
    ];
    return $sets;
} );

add_filter( 'bisteinoff_modals', function ( array $modals ): array {
    $modals[] = [
        'id'       => 'bst_newsletter',
        'title'    => __( 'Newsletter', 'my-child' ),
        'subtitle' => __( 'One email a month. No spam.', 'my-child' ),
        'content'  => do_shortcode( '[mailpoet_form id="1"]' ),
        'class'    => 'bst-modal-newsletter',
        'sanitize' => 'wp_kses_post',
    ];
    return $modals;
} );

Assets and performance

FilterArgumentsDefault / notes
bisteinoff_deferred_script_handlesarray $handlesScript handles that receive defer. Default includes Contact Form 7 and mediaelement handles.
bisteinoff_deferred_css_handlesarray $handlesStylesheets loaded asynchronously (media=print trick). Never add the theme’s critical CSS handles.
bisteinoff_preconnect_originsarray $originsOrigins for <link rel="preconnect">. The theme already collects origins it enqueues; push extra CDNs here. Scheme + host only, no path.
bisteinoff_builder_screens_choicesarray $choicesPost types that can enable the page builder in Website Settings. Default: page, post.
bisteinoff_gutenberg_screens_choicesarray $choicesScreens listed for the Gutenberg on/off option in Design Settings.
add_filter( 'bisteinoff_preconnect_origins', function ( array $origins ): array {
    $origins[] = 'https://fonts.gstatic.com';
    return $origins;
} );

add_filter( 'bisteinoff_deferred_script_handles', function ( array $handles ): array {
    $handles[] = 'my-analytics';
    return $handles;
} );

add_filter( 'bisteinoff_builder_screens_choices', function ( array $choices ): array {
    $choices['projects'] = _x( 'Projects', 'post type label', 'my-child' );
    return $choices;
} );

Multilingual

These run only when BISTEINOFF_SITE_MULTILINGUAL is true (see Theme Constants).

FilterArgumentsDefault / notes
bisteinoff_translated_post_typesarray $typesPost types that get a translation metabox / Gutenberg translations panel. Default: page, post, faq. Cookie Consent adds its cookie CPT.
bisteinoff_translated_termsarray $taxonomiesTaxonomies with term translation UI. Default: category, post_tag. WooCommerce products add product taxonomies.
bisteinoff_translated_product_typesarray $typesWooCommerce product types that get translation UI. Default: product.

The multilingual module also filters bisteinoff_metabox_fields, bisteinoff_term_metabox_fields, and bisteinoff_builder_metabox_fields to expand translatable fields. If you add fields on those hooks, mark them translatable the same way as parent fields when they should follow the language.

add_filter( 'bisteinoff_translated_post_types', function ( array $types ): array {
    $types[] = 'projects';
    return $types;
} );

Metabox fields

Two layers:

  1. A named filter per metabox: bisteinoff_{$metabox}_metabox_fields
  2. A generic filter on the rendered field list: bisteinoff_metabox_fields (posts) or bisteinoff_term_metabox_fields (terms)

Named filters receive ( array $fields, string $prefix ). Metabox slugs in the parent theme:

  • template → bisteinoff_template_metabox_fields (page template / builder)
  • contact → bisteinoff_contact_metabox_fields
  • seo → bisteinoff_seo_metabox_fields (posts and terms)
  • feature → bisteinoff_feature_metabox_fields
  • slide → bisteinoff_slide_metabox_fields
  • testimonial → bisteinoff_testimonial_metabox_fields
  • cookie → bisteinoff_cookie_metabox_fields

WooCommerce video gallery uses a prefixed name: bisteinoff_woo_video_gallery_metabox_fields.

Page Builder components each pass their field map through bisteinoff_builder_metabox_fields (button, title, posts, WYSIWYG, subscribe, content block, MailPoet, projects, …). The same filter name is used for every component, so inspect the field keys before changing them.

add_filter( 'bisteinoff_seo_metabox_fields', function ( array $fields, string $prefix ): array {
    $fields[ $prefix . '_no_snippet' ] = [
        'label' => __( 'Disable snippet', 'my-child' ),
        'type'  => 'checkbox',
    ];
    return $fields;
}, 10, 2 );

Admin settings panels

Each tab file is filtered twice. Names are stable: they use the filename without .php and the panel suffix, not the runtime tab-N id (that id shifts when earlier tabs are skipped).

bisteinoff_admin_{$tab}_{$suffix}_settings — field map, arguments ( array $settings, string $tab_id, string $tab_name, string $panel_suffix ). Stamp new fields with 'tab' => $tab_id.

bisteinoff_admin_{$tab}_{$suffix}_widgets — HTML string for the tab’s sidebar widget, same extra arguments.

Panel suffixes:

PanelSuffixExample hook (Posts / Banner tab)
Website Settingspanelbisteinoff_admin_posts_panel_settings
Design Settingsdesign_panelbisteinoff_admin_fonts_design_panel_settings
Languageslanguage_settingsbisteinoff_admin_switcher_language_settings_settings
Cookie Settingscookie_settingsbisteinoff_admin_banner_cookie_settings_settings
Testimonials Settingstestimonials_settingsbisteinoff_admin_settings_testimonials_settings_settings

Website Settings tab files (the {tab} segment): administration, site-identity, header, footer, posts, contact, modals, woo, ads, socials, seo, modules, embed, api, security, wp, maintenance.

Design Settings tab files: configuration, bootstrap-colors, colors, neutrals, gradients, effects, fonts, header, nav, page, sections, buttons, footer.

The SEO module also listens to bisteinoff_admin_seo_panel_widgets (same naming as the SEO tab of Website Settings).

add_filter( 'bisteinoff_admin_header_panel_settings', function ( array $settings, string $tab_id ): array {
    $settings['header_announcement'] = [
        'label'      => __( 'Announcement bar', 'my-child' ),
        'type'       => 'text',
        'translated' => true,
        'tab'        => $tab_id,
    ];
    return $settings;
}, 10, 2 );

add_filter( 'bisteinoff_admin_seo_panel_widgets', function ( string $html ): string {
    return $html . '<p class="bst-widget">' . esc_html__( 'Leave title templates empty to use the post title.', 'my-child' ) . '</p>';
} );

Which filter should I use?

  • Change a URL or breadcrumb trail → bisteinoff_canonical_url / bisteinoff_breadcrumb_items
  • Add a social network or icon kit → bisteinoff_socials_config / bisteinoff_icon_sets
  • Add a modal → bisteinoff_modals
  • Add a special page template → bisteinoff_custom_pages plus a {id}-page.php file
  • Add an admin field → bisteinoff_admin_{tab}_{suffix}_settings or a metabox fields filter
  • Defer a third-party script → bisteinoff_deferred_script_handles
  • Inject HTML in the layout → an action hook, not a filter
Scroll To Top