[vc_row][vc_column][vc_column_text][php]

global $wpdb;
$cuisine= esc_sql($_GET[‘cuisine’]);
if($cuisine != “”)
{
$restaurants1 = $GLOBALS[‘wpdb’]->get_results( ‘SELECT `post_id` FROM `wp_postmeta` where meta_value=”‘.$cuisine.'”‘, OBJECT );
foreach($restaurants1 as $restaurant){
$restaurants2 = $GLOBALS[‘wpdb’]->get_results(‘SELECT `post_title`,`ID` FROM `wp_posts` WHERE `ID` =”‘.$restaurant->post_id.'” and post_type=”post”‘, OBJECT);
foreach($restaurants2 as $restaurant3){
echo ‘<a class=”cc” href=”‘.get_site_url().’/?p=’.$restaurant3->ID.'”>’.$restaurant3->post_title.'</a>’;
echo ”
“;
}
}
}
else
{
echo ‘<h4>No resturent in this cuisine ….! </h4>’;
}

[/php][/vc_column_text][/vc_column][/vc_row]