Ejemplo n.º 1
0
    function sf_header_wrap($header_layout)
    {
        global $post, $sf_options;
        $header_wrap_class = $logo_class = "";
        if (function_exists('sf_page_classes')) {
            $page_classes = sf_page_classes();
            $header_layout = $page_classes['header-layout'];
            $header_wrap_class = $page_classes['header-wrap'];
            $logo_class = $page_classes['logo'];
        }
        $page_header_type = "standard";
        if (is_page() && $post) {
            $page_header_type = sf_get_post_meta($post->ID, 'sf_page_header_type', true);
        } else {
            if (is_singular('post') && $post) {
                $post_header_type = sf_get_post_meta($post->ID, 'sf_page_header_type', true);
                $fw_media_display = sf_get_post_meta($post->ID, 'sf_fw_media_display', true);
                $page_title_style = sf_get_post_meta($post->ID, 'sf_page_title_style', true);
                if ($page_title_style == "fancy" || $fw_media_display == "fw-media-title" || $fw_media_display == "fw-media") {
                    $page_header_type = $post_header_type;
                }
            } else {
                if (is_singular('portfolio') && $post) {
                    $port_header_type = sf_get_post_meta($post->ID, 'sf_page_header_type', true);
                    $fw_media_display = sf_get_post_meta($post->ID, 'sf_fw_media_display', true);
                    $page_title = sf_get_post_meta($post->ID, 'sf_page_title', true);
                    $page_title_style = sf_get_post_meta($post->ID, 'sf_page_title_style', true);
                    if ($page_title_style == "fancy" || !$page_title) {
                        $page_header_type = $port_header_type;
                    }
                }
            }
        }
        // Shop page check
        $shop_page = false;
        if (function_exists('is_shop') && is_shop() || function_exists('is_product_category') && is_product_category()) {
            $shop_page = true;
        }
        if ($shop_page) {
            if (isset($sf_options['woo_page_header'])) {
                $page_header_type = $sf_options['woo_page_header'];
            }
        }
        $fullwidth_header = $sf_options['fullwidth_header'];
        $enable_mini_header = $sf_options['enable_mini_header'];
        $enable_tb = $sf_options['enable_tb'];
        $enable_sticky_tb = false;
        if (isset($sf_options['enable_sticky_topbar'])) {
            $enable_sticky_tb = $sf_options['enable_sticky_topbar'];
        }
        $header_left_config = $sf_options['header_left_config'];
        $header_right_config = $sf_options['header_right_config'];
        if (($page_header_type == "naked-light" || $page_header_type == "naked-dark") && ($header_layout == "header-vert" || $header_layout == "header-vert-right")) {
            $header_layout = "header-4";
            $enable_tb = false;
        }
        ?>
			<?php 
        if ($enable_tb) {
            ?>
				<!--// TOP BAR //-->
				<?php 
            echo sf_top_bar($enable_sticky_tb);
            ?>
			<?php 
        }
        ?>

			<!--// HEADER //-->
			<div class="header-wrap <?php 
        echo esc_attr($header_wrap_class);
        ?>
 page-header-<?php 
        echo esc_attr($page_header_type);
        ?>
">

				<div id="header-section" class="<?php 
        echo esc_attr($header_layout);
        ?>
 <?php 
        echo esc_attr($logo_class);
        ?>
">
					<?php 
        if ($enable_mini_header) {
            echo sf_header($header_layout);
        } else {
            echo '<div class="sticky-wrapper">' . sf_header($header_layout) . '</div>';
        }
        ?>
				</div>

				<?php 
        // Fullscreen Search
        echo sf_fullscreen_search();
        ?>

				<?php 
        // Fullscreen Search
        if (isset($header_left_config) && array_key_exists('supersearch', $header_left_config['enabled']) || isset($header_right_config) && array_key_exists('supersearch', $header_right_config['enabled'])) {
            echo sf_fullscreen_supersearch();
        }
        ?>

				<?php 
        // Overlay Menu
        if (isset($header_left_config) && array_key_exists('overlay-menu', $header_left_config['enabled']) || isset($header_right_config) && array_key_exists('overlay-menu', $header_right_config['enabled'])) {
            echo sf_overlay_menu();
        }
        ?>

				<?php 
        // Contact Slideout
        if (isset($header_left_config) && array_key_exists('contact', $header_left_config['enabled']) || isset($header_right_config) && array_key_exists('contact', $header_right_config['enabled'])) {
            echo sf_contact_slideout();
        }
        ?>

			</div>

		<?php 
    }
Ejemplo n.º 2
0
		<?php 
}
?>
			
			<!--// HEADER //-->
			<div class="header-wrap<?php 
echo $header_wrap_class;
?>
">
				
				<?php 
if ($enable_top_bar) {
    ?>
					<!--// TOP BAR //-->
					<?php 
    echo sf_top_bar();
    ?>
				<?php 
}
?>
	
					
				<div id="header-section" class="<?php 
echo $header_layout;
?>
 <?php 
echo $logo_class;
?>
">
					<?php 
echo sf_header($header_layout);
Ejemplo n.º 3
0
$my_query = new WP_Query($args);
$ca_fetured_bg = '';
$ca_have_featured = false;
if ($my_query->have_posts()) {
    $my_query->the_post();
    $ca_have_featured = true;
    if (has_post_thumbnail()) {
        $thumb_id = get_post_thumbnail_id();
        $thumb_url = wp_get_attachment_image_src($thumb_id, 'full', true);
        $ca_fetured_bg = $thumb_url[0];
    }
}
if ($enable_top_bar) {
    $ca_sf_top_bar = sf_top_bar();
    $ca_sf_top_bar = str_replace('<div class="tb-right col-sm-6 clearfix">', '<div class="tb-right col-sm-6 clearfix"><a href="#" class="visible-sm visible-xs mobile-menu-show"><i class="ss-rows"></i></a>', $ca_sf_top_bar);
    echo $ca_have_featured ? $ca_sf_top_bar : sf_top_bar();
}
if ($ca_have_featured) {
    if (is_front_page()) {
        ?>
							<div class="ca_jumbotron" style="background-image: url('<?php 
        echo $ca_fetured_bg;
        ?>
');">
								<div class="container">
									<div class="row">
									<div class="jumbotron col-lg-10 col-md-10 col-sm-9 col-xs-10">
										<h1><?php 
        the_title();
        ?>
</h1>