<?php // Do not copy this line, start with line 3
add_action( 'after_setup_theme', 'my_theme_header_footer_support' );
function my_theme_header_footer_support() {
add_theme_support( 'fl-theme-builder-headers' );
add_theme_support( 'fl-theme-builder-footers' );
add_theme_support( 'fl-theme-builder-parts' );
}
<?php // Do not copy this line, start with line 3
add_action( 'wp', 'my_theme_header_footer_render' );
function my_theme_header_footer_render() {
// Get the header ID.
$header_ids = FLThemeBuilderLayoutData::get_current_page_header_ids();
// If we have a header, remove the theme header and hook in Theme Builder's.
if ( ! empty( $header_ids ) ) {
remove_action( 'genesis_header', 'genesis_do_header' );
add_action( 'genesis_header', 'FLThemeBuilderLayoutRenderer::render_header' );
}
// Get the footer ID.
$footer_ids = FLThemeBuilderLayoutData::get_current_page_footer_ids();
// If we have a footer, remove the theme footer and hook in Theme Builder's.
if ( ! empty( $footer_ids ) ) {
remove_action( 'genesis_footer', 'genesis_do_footer' );
add_action( 'genesis_footer', 'FLThemeBuilderLayoutRenderer::render_footer' );
}
}
<?php // Do not copy this line, start with line 3
add_action( 'after_setup_theme', 'my_theme_header_footer_support' );
function my_theme_header_footer_support() {
add_theme_support( 'fl-theme-builder-headers' );
add_theme_support( 'fl-theme-builder-footers' );
}
<?php // Do not copy this line, start with line 3
remove_action( 'genesis_header', 'genesis_do_header' );