/**
 * Get header for builder templates
 */
function spyropress_get_builder_header()
{
    global $wp_query;
    $template_id = $wp_query->queried_template_id;
    $canvas_header = get_post_meta($template_id, 'canvas_header', true);
    // if left blank or theme default
    if ($canvas_header == '' || $canvas_header == -2) {
        get_header();
        return;
    } elseif ($canvas_header == -1) {
        get_header('blank');
        return;
    }
    // custom header
    get_header('blank');
    spyropress_before_header();
    echo '<!-- header --><header id="header">';
    spyropress_before_header_content();
    echo builder_render_frontend_rows($canvas_header, true);
    spyropress_after_header_content();
    echo '</header><!-- /header -->';
    spyropress_after_header();
    return;
}
Ejemplo n.º 2
0
language_attributes();
?>
> <!--<![endif]-->
<head>
    <?php 
wp_head();
?>

</head>
<body <?php 
body_class('one-page');
?>
 data-target=".single-menu" data-spy="scroll" data-offset="200">
<?php 
spyropress_wrapper();
?>

    <?php 
spyropress_before_header();
?>

    <!-- header -->
    <?php 
spyropress_before_header_content();
spyropress_get_template_part('part=templates/header/header-onepage');
spyropress_after_header_content();
?>

    <!-- /header -->
    <?php 
spyropress_after_header();