Snippets: 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.

add_filter( 'wpex_header_builder_page_id', function( $id ) {

	if ( is_front_page() ) {

	return $id;

} );

Snippet Type: PHP

Posted Under: Header

All PHP snippets should be added via a child theme's functions.php file or via the Code Snippets Plugin (or alternative plugin)