I want to disable the message "No result found" during page loading in my Wordpress site.
$search_code = $_POST['search_code'];
global $wpdb;
$helloworld_id = $wpdb->get_var("SELECT s_image FROM search_code WHERE s_code = $search_code");
if (empty($helloworld_id)) {
echo '<div class="no_results">No results found</div>';
}
else
{
?>
<img src="http://igtlaboratories.com/wp-content/uploads/images/<?php echo $helloworld_id; ?>"style="width:200px;height: auto;">
<?php
}
}
I used this code but when page load by default "No result found" visible. How I disable this massage during page load. Any help?