Filter hooks

Every apply_filters() call in Highend's own code, grouped by area, with the most useful ones highlighted.

This is a full reference of the filters Highend's own theme code exposes: everything you can hook into with add_filter() from a child theme's functions.php to change a computed value (an array of classes, a query's arguments, an option's value, and so on) without editing the parent theme. It doesn't cover WordPress core filters the theme happens to call (the_content, widget_title, and similar) or WPBakery's own VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG-based filters inside vc_templates/; those are documented by WordPress core and WPBakery themselves.

For the counterpart list of do_action() calls, see Action hooks.

Most useful filters

These are the filters you're most likely to reach for. Full reference tables for everything else follow below.

Prop

Type

Add a social network

functions.php (child theme)
add_filter( 'highend_social_networks_array', 'highend_child_add_social_network' );

function highend_child_add_social_network( $networks ) {

	$networks['mastodon'] = 'Mastodon';

	return $networks;
}

Override one option value

functions.php (child theme)
add_filter( 'highend_options_value', 'highend_child_force_boxed_layout', 10, 2 );

function highend_child_force_boxed_layout( $value, $option_name ) {

	if ( 'hb_global_layout' === $option_name ) {
		return 'hb-boxed-layout';
	}

	return $value;
}
functions.php (child theme)
add_filter( 'highend_post_related_articles_args', 'highend_child_related_args', 10, 2 );

function highend_child_related_args( $args, $post_id ) {

	$categories = wp_get_post_categories( $post_id );

	if ( $categories ) {
		$args['category__in'] = $categories;
	}

	return $args;
}

Options, customizer, and admin

FilterInParamsUse case
highend_options_valuefunctions/common.php:424$value, $option_nameFires every time highend_option() reads a value. Override any single option programmatically.
highend_default_option_valuesincludes/core/class-highend-options.php:116$defaults (array)Change the fallback defaults used before any option has been saved.
highend_customizer_configuration_defaultsincludes/customizer/class-highend-customizer.php:293$defaults (array), $type (control type)Change default config for a Customizer control type Highend registers.
highend_custom_customizer_controlsincludes/customizer/class-highend-customizer.php:332$controls (array)Register a custom Customizer control class.
highend_customizer_optionsincludes/customizer/class-highend-customizer.php:263$options (array, default empty)Add your own Customizer settings/controls through Highend's registration loop.

Layout and wrapper classes

FilterInParamsUse case
highend_site_layoutfunctions/helpers.php:374$layout (string)Override the resolved site layout (hb-boxed-layout / hb-stretched-layout).
highend_page_layoutfunctions/helpers.php:350$layout (string)Override the resolved sidebar layout for the current page.
highend_content_widthincludes/core/class-highend-theme-setup.php:165$content_width (int)Change the global $content_width value WordPress uses for image/embed sizing.
highend_main_wrapper_classfunctions/helpers.php:1126$classes (array)Classes on the #hb-wrap main wrapper element.
highend_header_classfunctions/helpers.php:1147$classes (array)Classes on the <header> element.
highend_side_navigation_classfunctions/helpers.php:1206$classes (array)Classes on the side navigation panel (Left Panel header layout).
highend_page_title_classfunctions/helpers.php:1248$classes (array)Classes on the page title bar.
highend_page_title_stylefunctions/helpers.php:1272$style (string), $post_idInline style attribute for the page title bar (background color/image).
highend_featured_section_classesfunctions/helpers.php:1310$classes (array), $post_idClasses on the featured section wrapper.
highend_featured_section_stylefunctions/helpers.php:1349$style (string), $post_idInline style attribute for the featured section.
highend_main_content_stylefunctions/helpers.php:593$styles (array)Inline styles for the main content wrapper. Added in 4.5.1. The older misspelled highed_main_content_style still runs first, so existing code keeps working.
highend_attr_{context}functions/helpers.php:1379$attributes (array), $context, $argsDynamic filter from highend_attr(): {context} is whatever string a given call site passes (used sparingly in the theme).
highend_attr_{context}_outputfunctions/helpers.php:1397$output (string), $attributes, $context, $argsSame as above, filtering the final built attribute string instead of the array.

Header, navigation, and page title

FilterInParamsUse case
highend_header_layoutfunctions/helpers.php:393$layout (string), $post_idOverride the resolved header layout (nav type / left panel).
highend_header_containerfunctions/helpers.php:407$container (string)Override the header's container width setting.
highend_header_inner_classtemplate-parts/header/base.php:29$classes (array), $post_idClasses on the header's inner wrapper element.
highend_main_navigation_classfunctions/helpers.php:1172$classes (array)Classes on the main <nav> element.
highend_main_navigation_argstemplate-parts/header/navigation.php:22$args (array, wp_nav_menu() arguments)Customize the main menu's wp_nav_menu() call: menu_class, walker, and so on.
highend_main_navigation_theme_locationfunctions/helpers.php:993$location (string), $post_idWhich registered nav menu location renders as the main menu (main-menu vs one-page-menu).
highend_mobile_menu_nav_classfunctions/template-parts.php:270$class (string)Classes on the mobile menu nav element.
highend_mobile_menufunctions/template-parts.php:324$output (string)The mobile menu's final HTML output.
highend_hamburger_menufunctions/template-parts.php:1720$output (string, default markup)The mobile menu toggle button's markup.
highend_page_title_settingsfunctions/helpers.php:461$settings (array), $post_idThe full resolved page title configuration (type, colors, animation, height, and so on) before it's rendered.
highend_page_title_tagtemplate-parts/header/page-title.php:27$tag (string, default "h1")The HTML tag wrapping the page title text.
highend_logo_outputfunctions/template-parts.php:2278$output (string)The final logo <img>/<a> markup.
highend_side_nav_bg_imagefunctions/template-parts.php:2177$image (string, URL)Background image URL for the side navigation panel.
highend_top_bar_containertemplate-parts/top-bar/top-bar.php:11$container (string)Override the top info bar's container width setting.
highend_top_bar_widgetsfunctions/helpers.php:795$widgets (array, keyed left/right)Which top bar widgets render on each side, and in what order (defaults: info, map, email on the left; socials, custom_link, languages, cart, login on the right).

Top bar widgets

Each top bar widget (info, map, email, login, languages, cart, custom_link, socials) exposes a _class filter and an _output filter with the same signature; the info, map, email, and custom_link widgets also expose _icon and _text filters. All live in functions/template-parts.php.

WidgetClass filterIcon / text filtersOutput filter
Infohighend_top_bar_widget_info_classhighend_top_bar_widget_info_icon, highend_top_bar_widget_info_texthighend_top_bar_widget_info_output
Maphighend_top_bar_widget_map_classhighend_top_bar_widget_map_icon, highend_top_bar_widget_map_texthighend_top_bar_widget_map_output
Emailhighend_top_bar_widget_email_classhighend_top_bar_widget_email_icon, highend_top_bar_widget_email_texthighend_top_bar_widget_email_output
Loginhighend_top_bar_widget_login_class—highend_top_bar_widget_login_output
Languages (WPML)highend_top_bar_widget_languages_class—highend_top_bar_widget_languages_output
Cart (WooCommerce)highend_top_bar_widget_cart_class—highend_top_bar_widget_cart_output
Custom linkhighend_top_bar_widget_custom_link_classhighend_top_bar_widget_custom_link_icon, highend_top_bar_widget_custom_link_link, highend_top_bar_widget_custom_link_texthighend_top_bar_widget_custom_link_output
Social iconshighend_top_bar_widget_socials_class—highend_top_bar_widget_socials_output

Every _output filter receives just the final HTML string for that widget, so it's the simplest way to change one widget's markup without a template override.

FilterInParamsUse case
highend_is_top_bar_displayedfunctions/helpers.php:718$displayed (bool), $post_idForce the top bar to show or hide.
highend_is_page_title_displayedfunctions/helpers.php:768$displayed (bool), $post_idForce the page title bar to show or hide.
highend_is_footer_widgets_displayedfunctions/helpers.php:818$displayed (bool)Force the footer widget columns to show or hide.
highend_is_copyright_displayedfunctions/helpers.php:832$displayed (bool)Force the copyright bar to show or hide.
highend_is_pre_footer_displayedfunctions/helpers.php:856$displayed (bool)Force the pre-footer callout to show or hide.
highend_footer_widget_layout_classesfunctions/helpers.php:937$classes (array, keyed by style then column)The column-width class map for each footer widget layout style.
highend_footer_widgets_classtemplate-parts/footer/widgets.php:24$class (array)Classes on the footer widgets wrapper.
highend_pre_footer_button_classtemplate-parts/footer/pre-footer.php:24$class (string)Classes on the pre-footer callout's button.
highend_copyright_classtemplate-parts/footer/copyright.php:21$class (array)Classes on the copyright bar wrapper.
highend_sidebar_namefunctions/template-parts.php:1388$sidebar (string)The sidebar ID resolved for the current page before dynamic_sidebar() runs.
highend_comments_openfunctions/helpers.php:974$comments_open (bool)Override whether comments show as open for the current post.
highend_comment_form_argscomments.php:80$args (array, comment_form() arguments)Customize the comment form: field markup, labels, and so on.

Content, blog, and single post

FilterInParamsUse case
highend_get_page_templatefunctions/helpers.php:633$template (string), $post_idWhich blog-layout template slug resolves for the current context.
highend_posts_page_templateindex.php:23$template (string)Which blog layout renders the main blog index (index.php), before the hb_posts_page_template option's value is used as the fallback.
highend_search_templatesearch.php:23$template (string)Which blog layout renders search results, before the hb_search_template option's value is used as the fallback.
highend_archive_templatefunctions/template-parts.php:1911$template (string)Which blog layout renders a standard archive (category/tag/date/author), before the hb_archive_template option's value is used as the fallback.
highend_blog_classfunctions/helpers.php:523$classes (array), $templateClasses on the main blog/archive container.
highend_blog_datafunctions/helpers.php:560$data (array), $template, $post_iddata-* attributes on the blog/archive container (used for the masonry layout mode).
highend_blog_minimal_icontemplate-parts/entry/entry-blog-minimal.php:52$icon (string, icon class), $format (post format slug)The post-format icon shown on the Blog Minimal layout specifically (separate from the general highend_post_format_icon filter).
highend_paginate_links_argsfunctions/helpers.php:121$args (array, paginate_links() arguments)Customize pagination: labels, range, mid_size, and so on.
highend_single_next_prev_displayedfunctions/template-parts.php:1834$displayed (bool)Whether the next/previous post links show on a single post.
highend_enable_post_author_infoboxfunctions/template-parts.php:2046$enabled (bool), $post_idWhether the author info box shows under a single post.
highend_enable_related_postsfunctions/template-parts.php:2069$enabled (bool), $post_idWhether the related-posts block shows under a single post.
highend_post_related_articles_argsfunctions/template-parts.php:2082$args (array, WP_Query args), $post_idThe query used to find related posts.
highend_related_posts_titlefunctions/template-parts.php:2089$title (string)Heading text above the related-posts block.
highend_related_post_image_argsfunctions/template-parts.php:2105$args (array: width, height, crop)Thumbnail dimensions for each item in the related-posts block.
highend_allowed_html_tagsfunctions/common.php:508$tags (array, wp_kses format), $typeThe extra HTML tags (SVG icons, and so on) Highend allows through wp_kses() in its own output.
highend_is_maintenancefunctions/common.php:206$is_maintenance (bool)Override whether maintenance mode is active for the current request.
highend_get_the_idfunctions/common.php:231$post_id (int)The post/page ID Highend resolves as "current" outside the main loop (used throughout the meta getters).

Page and archive titles

Each of these filters the resolved title or description string for one specific context, all in functions/common.php:

highend_home_page_title, highend_blog_page_title, highend_404_page_title, highend_search_page_title, highend_woocommerce_product_category_title, highend_bbp_forum_archive_title, highend_author_page_title, highend_single_faq_page_title, highend_single_testimonials_page_title, highend_search_page_description, highend_archive_day_description, highend_archive_month_description, highend_archive_year_description.

Page templates (Contact, 404)

FilterInParamsUse case
highend_contact_map_argspage-templates/contact.php:44$args (array, map wrapper markup), $page_idCustomize the map background rendered behind the Contact page template.
highend_404_page_contentfunctions/template-parts.php:2006$content (string, HTML)The 404 page's default title/subtitle/button block, before output.

Portfolio

FilterInParamsUse case
highend_portfolio_post_typeincludes/portfolio/class-highend-portfolio.php:119$args (array, register_post_type() args)Change the portfolio post type's registration arguments.
highend_portfolio_post_type_labelsincludes/portfolio/class-highend-portfolio.php:101$labels (array)Change the portfolio post type's admin labels.
highend_portfolio_category_tax_argsincludes/portfolio/class-highend-portfolio.php:177$args (array)Change the portfolio_categories taxonomy's registration arguments.
highend_portfolio_category_tax_labelsincludes/portfolio/class-highend-portfolio.php:160$labels (array)Change the portfolio_categories taxonomy's admin labels.
highend_portfolio_category_rewriteincludes/portfolio/class-highend-portfolio.php:185$slug (string, default "portfolio_category")Change the taxonomy's URL rewrite slug.
highend_portfolio_query_argsincludes/portfolio/portfolio-functions.php:58$args (array, WP_Query args), $post_idThe query used to build a Portfolio page template's grid.
highend_portfolio_simple_item_classincludes/portfolio/portfolio-functions.php:158$class (string), $argsClasses on each item in the Portfolio Simple layout.
highend_portfolio_simple_page_argsincludes/portfolio/class-highend-portfolio.php:281$template_args (array), $post_idArguments passed to the Portfolio Simple page template renderer.
highend_portfolio_standard_page_argsincludes/portfolio/class-highend-portfolio.php:290$template_args (array), $post_idArguments passed to the Portfolio Standard page template renderer.
highend_portfolio_category_archive_argsincludes/portfolio/class-highend-portfolio.php:325$args (array)Arguments used when rendering a portfolio_categories term archive.
FilterInParamsUse case
highend_gallery_post_typeincludes/gallery/class-highend-gallery.php:119$args (array)Change the gallery post type's registration arguments.
highend_gallery_post_type_labelsincludes/gallery/class-highend-gallery.php:101$labels (array)Change the gallery post type's admin labels.
highend_gallery_category_tax_argsincludes/gallery/class-highend-gallery.php:175$args (array)Change the gallery_categories taxonomy's registration arguments.
highend_gallery_category_tax_labelsincludes/gallery/class-highend-gallery.php:158$labels (array)Change the gallery_categories taxonomy's admin labels.
highend_gallery_category_rewriteincludes/gallery/class-highend-gallery.php:183$slug (string, default "gallery_category")Change the taxonomy's URL rewrite slug.
highend_gallery_query_argsincludes/gallery/gallery-functions.php:70$args (array, WP_Query args), $post_idThe query used to build a Gallery page template's grid.
highend_standard_gallery_item_classincludes/gallery/gallery-functions.php:169$class (string), $argsClasses on each item in the Gallery Standard layout.
highend_gallery_standard_page_argsincludes/gallery/class-highend-gallery.php:781$args (array), $post_idArguments passed to the Gallery Standard page template renderer.
highend_gallery_category_archive_argsincludes/gallery/class-highend-gallery.php:820$args (array)Arguments used when rendering a gallery_categories term archive.

Other taxonomy rewrite slugs

highend_faq_category_rewrite, highend_testimonial_category_rewrite, highend_client_category_rewrite, and highend_team_member_category_rewrite (all in includes/core/class-highend-theme-setup.php) each filter the URL rewrite slug (string) for the FAQ, Testimonial, Client, and Team Member category taxonomies respectively.

Widgets and post-type registration

FilterInParamsUse case
highend_social_networks_arrayfunctions/common.php:64$links (array, id → label)The full list of social networks offered in Social settings and the socials widget/top bar widget.
highend_widgets_arrayincludes/core/class-highend-theme-setup.php:236$widgets (array of file-name slugs)Which bundled widget classes get required and registered. Removing a slug here stops that widget from being defined at all. This isn't the same as hiding it from the widget picker.
highend_team_member_archive_argsfunctions/template-parts.php:1956$args (array: content, social_link, columns)Display arguments for the Team Member category archive's grid.
highend_team_member_archive_classfunctions/template-parts.php:1966$class (string)Classes on the Team Member category archive's container.
highend_team_member_image_sizefunctions/template-parts.php:156$dimensions (array: width, height)Thumbnail dimensions for the Team Members Box element.
highend_portfolio_widget_image_sizeincludes/widgets/widget-portfolio.php:88$size (array: width, height, crop)Thumbnail dimensions used by the Latest Portfolio Items and Random Portfolio Item widgets.
highend_social_icons_widget_classesincludes/widgets/widget-social-icons.php:66$classes (array), $instance (widget settings)Classes on the Social Icons widget's output.
highend_woocommerce_product_classeswoocommerce/content-product.php:57$classes (array)Classes on each WooCommerce product card in the shop loop.

Assets and misc

FilterInParamsUse case
highend_custom_js_localizedincludes/core/class-highend-enqueue-scripts.php:159$highend_vars (array)The data object localized to the highend_vars JS variable. Add your own values for use in a child theme script.
highend_default_font_facesfunctions/common.php:462$font_faces (array, @font-face descriptors)Register an additional font face for use in Typography settings.
highend_dynamic_stylesfunctions/dynamic-styles.php:700$css (string)The final generated dynamic CSS, before it's written out. Append or adjust rules here.
highend_map_marker_numberfunctions/helpers.php:273$marker_count (int, default 10)Raise the number of map locations available in Map Settings beyond the default 10.
highend_map_providerfunctions/helpers.php:233$provider (string, openstreetmap or google)Force a map provider regardless of the Map Settings option. Added in 4.5.1.
highend_map_style_urlfunctions/helpers.php:254$url (string, style JSON URL), $style (positron or dark)Point OpenStreetMap maps at a different MapLibre style, for example a self-hosted or MapTiler style. Added in 4.5.1.
highend_post_format_iconfunctions/helpers.php:267$icon (string, icon class), $format (post format slug)Change the icon shown for a given post format.
highend_focus_colorfunctions/helpers.php:25$color (string, hex)Fallback focus color used before the Customizer's Focus Color setting is read.
highend_import_attachment_batch_sizehbframework/admin/utilities/class-demo-importer.php:617$batch_size (int, default 5)How many media items the demo importer sideloads per request. Lower it on hosts with tight PHP limits.

On this page