<?php
   /**
    * Template to show the Image Banner
    *
    * @package hardware-dealer-pro
    */

 ?>

<?php
if ( ! is_singular() ) {
	return;
}
global $post;
$img = get_post_meta($post->ID, 'elemento_title_banner_image_wp_custom_attachment', true);
$display = '';
$display_title_bbanner = '';
$elemento_title_banner_image_title_on_off = get_post_meta($post->ID, 'elemento_title_banner_image_title_on_off', true);
if($elemento_title_banner_image_title_on_off == 'on') $display = 'style=display:none;';
$elemento_title_banner_image_title_below_on_off = get_post_meta($post->ID, 'elemento_title_banner_image_title_below_on_off', true);
if($elemento_title_banner_image_title_below_on_off != 'on') $display_title_bbanner = 'style=display:none;';
if( $img != '' ){ ?>
  	<div class="title-box">
      <img src="<?php echo esc_url($img); ?>" alt="Title Banner Image">
      <div class="above_title <?php echo esc_attr($display); ?>">
        <div class="">
          <h1><?php the_title();?></h1>
          <div class="elemento-bradcrumbs">
            <?php echo hardware_dealer_pro_the_breadcrumb(); ?>
          </div>
        </div>
      </div>
    </div>
<?php } ?>
