<?php global $post, $pixomi_data;
$id = pixomi_current_page_id();
$switch_titlebar = get_post_meta ( $id, 'pixomi_enable_titlebar', true ) ? get_post_meta ( $id, 'pixomi_enable_titlebar', true ) : 'yes'; 
$titlebar_bg_img = get_post_meta( $post->ID, 'pixomi_titlebar_bg_img', true ); 
$header_layout   = pixomi_choose_header();  
if($header_layout == '2'){
    $titlebar_class = 'titlebar-modern'; 
} elseif($header_layout == '3'){
    $titlebar_class = 'titlebar-trans'; 
} elseif($header_layout == '5'){
    $titlebar_class = 'titlebar-stack'; 
} else{ $titlebar_class = ''; } ?>
<?php if( $switch_titlebar == 'yes' && !is_404() && !is_front_page() ){ ?>
    <div id="titlebar" class="<?php echo esc_attr( $titlebar_class ); ?>" style="background-image:url('<?php echo esc_url($titlebar_bg_img); ?>');">
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    <h1 class="title"><?php echo pixomi_page_title(); ?></h1>
                    <div class="breadcrumbs">
                        <?php pixomi_breadcrumbs(); ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
<?php } ?>
