Skip to content

Snippet: Move Header & Footer Outside of the “Boxed” Layout

function myprefix_move_header_footer_out_of_boxed_layout() {

	// Remove header/footer
	remove_action( 'wpex_hook_wrap_top', 'wpex_header' );
	remove_action( 'wpex_hook_wrap_bottom', 'wpex_footer' );

	// Re-add header/footer
	add_action( 'wpex_outer_wrap_before', 'wpex_header', 9999 );
	add_action( 'wpex_outer_wrap_after', 'wpex_footer' );

}
add_action( 'init', 'myprefix_move_header_footer_out_of_boxed_layout' );
All PHP snippets should be added via child theme's functions.php file or via a plugin. We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top