">
			
			<?php 
$post_id = class_exists('Woocommerce') && is_woocommerce() ? get_option('woocommerce_shop_page_id') : get_the_ID();
$title_custom = get_post_meta($post_id, '_st_general_title_custom', TRUE);
$sub_title = get_post_meta($post_id, '_st_general_title_sub', TRUE);
if (class_exists('Woocommerce') && is_woocommerce()) {
    $page_title = !empty($title_custom) ? $title_custom : woocommerce_page_title(false);
} else {
    $page_title = !empty($title_custom) ? $title_custom : get_the_title();
}
echo '<h1 class="page-title"><span>' . esc_attr($page_title) . '</span></h1>';
if (!empty($sub_title)) {
    echo '<span class="page-subtitle">' . esc_attr($sub_title) . '</span>';
}
if (builtpress_opt_page('title_breadcrumb')) {
    if (class_exists('Woocommerce') && is_woocommerce()) {
        woocommerce_breadcrumb();
    } else {
        builtpress_breadcrumb();
    }
}
?>
			
			</div>
			</div>
				
		</div>
	
	</div>
	</div>
Exemplo n.º 2
0
}
?>
	<?php 
wp_head();
?>
	
</head>

<body <?php 
body_class();
?>
>

<div id="st-wrapper">
<?php 
get_template_part('parts/header', esc_attr(builtpress_opt_page('header_style', 'v1')));
if (!is_front_page()) {
    if (is_page() || is_singular(array('st_portfolio', 'st_service', 'st_team'))) {
        $general_title_hide = get_post_meta(get_the_ID(), '_st_general_title_hide', TRUE);
        if ($general_title_hide != 'on') {
            get_template_part('parts/header', 'pagetitle-custom');
        }
    } elseif (class_exists('Woocommerce') && is_woocommerce()) {
        $general_title_hide = get_post_meta(get_option('woocommerce_shop_page_id'), '_st_general_title_hide', TRUE);
        if ($general_title_hide != 'on') {
            get_template_part('parts/header', 'pagetitle-custom');
        }
    } else {
        get_template_part('parts/header', 'pagetitle');
    }
}
 function builtpress_print_styles()
 {
     $post_id = class_exists('Woocommerce') && is_woocommerce() ? get_option('woocommerce_shop_page_id') : get_the_ID();
     $logo_height = 135;
     $topbar_height = builtpress_opt('topbar_enable') ? 40 : 0;
     $padding_top = $logo_height + $topbar_height;
     $title_padding_top = builtpress_opt_page('title_padding_top', 40);
     $title_padding_bottom = builtpress_opt_page('title_padding_bottom', 40);
     $color_title = builtpress_opt_page('color_title');
     $color_subtitle = builtpress_opt_page('color_subtitle');
     $color_breadcrumb = builtpress_opt_page('color_breadcrumb');
     $general_title_hide = get_post_meta($post_id, '_st_general_title_hide', TRUE);
     ob_start();
     require_once get_template_directory() . '/assets/css/style-custom.php';
     // Title Padding
     if (!empty($title_padding_top)) {
         echo ".title-holder { padding-top: " . intval($title_padding_top) . "px; }\n";
     }
     if (!empty($title_padding_bottom)) {
         echo ".title-holder { padding-bottom: " . intval($title_padding_bottom) . "px; }\n";
     }
     // Title Color
     if (!empty($color_title)) {
         echo ".page-title { color: " . esc_attr($color_title) . " !important; }\n";
     }
     // Subtitle Color
     if (!empty($color_subtitle)) {
         echo ".page-subtitle { color: " . esc_attr($color_subtitle) . " !important; }\n";
     }
     // Breadcrumb Color
     if (!empty($color_breadcrumb)) {
         echo ".breadcrumb li, .breadcrumb li a, .breadcrumb > .active { color: " . esc_attr($color_breadcrumb) . " !important; }\n";
     }
     // Padding Top
     if (builtpress_opt('header_style') == 'v1' && builtpress_opt_page('header_transparent')) {
         if ($general_title_hide != 'on') {
             echo "#title-wrapper { padding-top: " . intval($padding_top) . "px; }\n";
             echo "#content-wrapper.is-vc .post-content > .wpb_padding:first-child { padding-top: 80px; }\n";
         } else {
             echo "#content-wrapper.not-vc { padding-top: " . (intval($padding_top) + 80) . "px; }\n";
         }
     } else {
         if (builtpress_opt('header_style') == 'v2' && $general_title_hide != 'on') {
             echo "#title-wrapper { padding-top: 205px; }\n";
         }
         echo "#content-wrapper.is-vc .post-content > .wpb_padding:first-child { padding-top: 80px; }\n";
     }
     // Background Title
     $custom_bg_title = FALSE;
     if (is_page() || is_singular(array('st_portfolio', 'st_service', 'st_team'))) {
         $custom_bg_title = TRUE;
     } elseif (class_exists('Woocommerce') && is_woocommerce()) {
         $custom_bg_title = TRUE;
     }
     $style_bg_title = builtpress_opt('style_bg_title');
     if ($custom_bg_title) {
         $general_style_bg_title = builtpress_opt_page('style_bg_title');
         if (is_array($general_style_bg_title)) {
             if (preg_match('/[A-F0-9]{6}/', strtoupper($general_style_bg_title['background-color']))) {
                 $style_bg_title['background-color'] = $general_style_bg_title['background-color'];
                 $style_bg_title['background-image'] = '';
             }
             if (preg_match('/[\\w\\-]+\\.(jpg|png|gif|jpeg)/', strtolower($general_style_bg_title['background-image']))) {
                 $style_bg_title['background-color'] = '';
                 $style_bg_title['background-image'] = $general_style_bg_title['background-image'];
             }
             if (!empty($general_style_bg_title['background-repeat'])) {
                 $style_bg_title['background-repeat'] = $general_style_bg_title['background-repeat'];
             }
             if (!empty($general_style_bg_title['background-size'])) {
                 $style_bg_title['background-size'] = $general_style_bg_title['background-size'];
             }
             if (!empty($general_style_bg_title['background-attachment'])) {
                 $style_bg_title['background-attachment'] = $general_style_bg_title['background-attachment'];
             }
             if (!empty($general_style_bg_title['background-position'])) {
                 $style_bg_title['background-position'] = $general_style_bg_title['background-position'];
             }
         }
     }
     if (is_array($style_bg_title)) {
         $output = '';
         if (!empty($style_bg_title['background-color'])) {
             $output .= "background-color: " . esc_attr($style_bg_title['color']) . ";\n";
         }
         if (!empty($style_bg_title['background-image']) && preg_match('/[\\w\\-]+\\.(jpg|png|gif|jpeg)/', strtolower($style_bg_title['background-image']))) {
             $output .= "background-image: url('" . esc_url($style_bg_title['background-image']) . "');\n";
             if (!empty($style_bg_title['background-repeat'])) {
                 $output .= "background-repeat: " . esc_attr($style_bg_title['background-repeat']) . ";\n";
             }
             if (!empty($style_bg_title['background-size'])) {
                 $output .= "background-size: " . esc_attr($style_bg_title['background-size']) . ";\n";
             }
             if (!empty($style_bg_title['background-attachment'])) {
                 $output .= "background-attachment: " . esc_attr($style_bg_title['background-attachment']) . ";\n";
             }
             if (!empty($style_bg_title['background-position'])) {
                 $output .= "background-position: " . esc_attr($style_bg_title['background-position']) . ";\n";
             }
         }
         if (!empty($output)) {
             echo "#title-wrapper {\n";
             echo htmlspecialchars_decode(esc_textarea($output), ENT_QUOTES);
             echo "}\n";
         }
     }
     if ($custom_css = builtpress_opt('custom_css')) {
         echo htmlspecialchars_decode(esc_textarea($custom_css), ENT_QUOTES) . "\n";
     }
     $print_styles = ob_get_contents();
     ob_end_clean();
     $print_styles = preg_replace('!/\\*[^*]*\\*+([^/][^*]*\\*+)*/!', '', $print_styles);
     $print_styles = str_replace(': ', ':', $print_styles);
     $print_styles = str_replace(array("\r\n", "\r", "\n", "\t", '  ', '    ', '    '), '', $print_styles);
     wp_add_inline_style('builtpress-style', $print_styles);
 }
Exemplo n.º 4
0
<!-- header -->
<?php 
$header_skin = builtpress_opt_page('header_transparent') ? 'transparent' : 'default';
?>
<header id="header" class="header-skin-<?php 
echo esc_attr($header_skin);
?>
" role="banner">
    	
	<?php 
if (builtpress_opt('topbar_enable')) {
    get_template_part('parts/header', 'topbar');
}
?>
	
	<div id="header-wrapper" class="header-stick">
	
		<div class="container">
		<div class="row">
			
			<div class="col-md-12">
				
				<div class="header-container">
			
					<div class="header-logo">
						<?php 
builtpress_theme_logo();
?>
					</div>
					<a id="toggle-mobile-menu" class="toggle-menu"><span></span></a>