[vc_row padding_top=”10″ padding_bottom=”10″][vc_column][vc_column_text animation=”animate-when-visible” css_animation=”bottom-to-top”]

ROUNICK REVIEWS’ BEST RESTAURANTS LIST

[/vc_column_text][/vc_column][/vc_row][vc_row][vc_column width=”1/2″][vc_column_text]

By Cuisine

[/vc_column_text][vc_column_text][php] global $wpdb;
$qry1 = “select wp_posts.*,
(select bilu.meta_value from wp_postmeta as bilu where bilu.meta_key=’_wprs_post_category_food’ and bilu.post_id=wp_posts.ID ) as c
from wp_posts where
wp_posts.ID
IN (select wp_postmeta.post_id from wp_postmeta where meta_value=’Restaurant’ )
and wp_posts.post_type=’post’
and wp_posts.post_status=’publish’
GROUP BY c
LIMIT 20″;
$restaurants1 = $wpdb->get_results( $qry1, OBJECT );
foreach($restaurants1 as $restaurant){

echo'<div class=”panel-group” id=”accordion” role=”tablist” aria-multiselectable=”true”>’;
echo'<div class=”panel panel-default”>’;
echo'<div class=”panel-heading” role=”tab” id=”headingOne”>’;
echo'<h4 class=”panel-title”>’;
echo'<a class=”clickable collapsed” baseurl=”‘.get_site_url().'” data-toggle=”collapse” data-parent=”#accordion” aria-expanded=”false” aria-controls=”collapseOne” href=”#’.$restaurant->ID.'”>’.$restaurant->c.'</a>’;
echo'</h4>’;
echo'</div>’;
echo'<div id=”‘.$restaurant->ID.'” class=”panel-collapse collapse” role=”tabpanel” aria-labelledby=”headingOne”>’;
echo'<div class=”panel-body”>’;
$restaurants1 = $GLOBALS[‘wpdb’]->get_results( ‘SELECT `post_id` FROM `wp_postmeta` where meta_value=”‘.$restaurant->c.'” group by `post_id`’, 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 “<br>”;
}
}
echo'</div>’;
echo'</div>’;
echo'</div>’;
echo'</div>’;
echo'<br>’;
}
[/php][/vc_column_text][/vc_column][vc_column width=”1/2″][vc_column_text]

By Location

[/vc_column_text][vc_column_text][php] global $wpdb;
$qry1 = “select wp_posts.*,
(select bilu.meta_value from wp_postmeta as bilu where bilu.meta_key=’_wprs_post_addressLocality’ and bilu.post_id=wp_posts.ID ) as city
from wp_posts where
wp_posts.ID
IN (select wp_postmeta.post_id from wp_postmeta where meta_value=’Restaurant’ )
and wp_posts.post_type=’post’
and wp_posts.post_status=’publish’
GROUP BY city
LIMIT 35″;
$restaurants1 = $wpdb->get_results( $qry1, OBJECT );

foreach($restaurants1 as $restaurant){
echo'<div class=”panel-group” id=”accordion” role=”tablist” aria-multiselectable=”true”>’;
echo'<div class=”panel panel-default”>’;
echo'<div class=”panel-heading” role=”tab” id=”headingOne”>’;
echo'<h4 class=”panel-title”>’;
echo'<a class=”clickable collapsed” baseurl=”‘.get_site_url().'” data-toggle=”collapse” data-parent=”#accordion” aria-expanded=”false” aria-controls=”collapseOne” href=”#c’.$restaurant->ID.'”>’.$restaurant->city.'</a>’;
echo'</h4>’;
echo'</div>’;
echo'<div id=”c’.$restaurant->ID.'” class=”panel-collapse collapse” role=”tabpanel” aria-labelledby=”headingOne”>’;
echo'<div class=”panel-body”>’;
$restaurants1 = $GLOBALS[‘wpdb’]->get_results( ‘SELECT `post_id` FROM `wp_postmeta` where meta_value=”‘.$restaurant->city.'”‘, 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 “<br>”;
}
}
echo'</div>’;
echo'</div>’;
echo'</div>’;
echo'</div>’;
echo'<br>’;
}
[/php][/vc_column_text][/vc_column][/vc_row]