/** START || Fix MetForm issue in Header/Footer Template */ function remove_jkit_header_footer_default_filter() { remove_action( 'jkit_header', array( Jeg\Elementor_Kit\Templates\Template::instance(), 'render_header' ) ); remove_action( 'jkit_footer', array( Jeg\Elementor_Kit\Templates\Template::instance(), 'render_footer' ) ); } add_action( 'wp', 'remove_jkit_header_footer_default_filter' ); function add_custom_jkit_header_template() { $class_template = Jeg\Elementor_Kit\Templates\Template::instance(); $post_id = get_the_ID(); $headers = $class_template->get_header_template(); $header_id = null; foreach ( $headers as $header ) { $flag = $class_template->check_conditions( $post_id, $header['id'] ); if ( $flag ) { $header_id = $header['id']; break; } } if ( $header_id ) { ?>
get_header_content( $header_id ); ?>
get_footer_template(); $footer_id = null; foreach ( $footers as $footer ) { $flag = $class_template->check_conditions( $post_id, $footer['id'] ); if ( $flag ) { $footer_id = $footer['id']; break; } } if ( $footer_id ) { ?>