skip to Main Content

Override Header Builder Template ID

If you want to setup different templates for your Header Builder you can do so by hooking into the "wpex_header_builder_page_id" filter. This will allow you to assign a different template for different sections of your site using custom theme code. The example below shows how you may define a custom template for the front page. If you aren't sure how to locate the template ID you want to use check out this article.

/**
 * Override Header Builder Template ID
 *
 * @link https://total.wpexplorer.com/docs/snippets/header-builder-id/
 */
add_filter( 'wpex_header_builder_page_id', function( $id ) {
	if ( is_front_page() ) {
		$id = 'FRONT_PAGE_TEMPLATE_ID';
	}

	return $id;
} );
All PHP snippets should be added via child theme's functions.php file or via the Code Snippets Plugin (or alternative plugin)
Back To Top