<?php
global $webh_data;  
global $post; 
$imageurl = $image = $title = $description = $slider = '';
$header = get_post_meta( $post->ID, 'webhosty_option_select',true );
	 if( $header == 'sliders') {
		$slider =get_post_meta( $post->ID, 'webhosty_slider_code',true ); 
			if(shortcode_exists('rev_slider')){
				echo do_shortcode($slider);  
			}
	} elseif ($header == 'search'){
		$formtitle = get_post_meta( $post->ID, 'webhosty_search_title',true );
		$placeholder = get_post_meta( $post->ID, 'webhosty_search_placeholder',true );
		echo '<form action="' .esc_url(home_url( '/' )) . '" method="post" id="search">
				    <fieldset>
					<h2>'.esc_attr($formtitle).':</h2>  
					<p><label for="searchhead">'.esc_attr($placeholder).'</label>
					<input type="text" id="searchhead" name="' .__('s','webhosty').'" value="'.get_search_query().'"><button type="submit"></button></p>
					</fieldset>
				</form>';
	}else{
	   $imageurl = get_post_meta( $post->ID,  'webhosty_image_src',true );
        if(!empty($imageurl)){	   
	     $image = aq_resize($imageurl, '500', '400', true);
	    }else{
		$image = get_template_directory_uri().'/images/1400x720-2.gif';
		}
	   $title = get_post_meta( $post->ID, 'webhosty_banner_title',true ); 
	   $description = get_post_meta( $post->ID, 'webhosty_banner_description',true );	 ?>
		<article id="featured">  
			<h2 class="scheme-c">
			<?php if(!empty($title)){  
			   echo esc_attr($title );
		    }else{
		     echo esc_attr(get_the_title($post->ID));
		    } ?>
		</h2>
			<p><?php echo  esc_attr($description); ?></p>
			<figure><img src="<?php echo esc_url($image); ?>" alt="Placeholder" ></figure>
		</article>  
<?php } ?> 