Getting additional columns from sql
You need to add another join: INNER JOIN $wpdb->postmeta rate_review ON p.ID = rate_review.post_id Add the condition to your where clause: AND rate_review.meta_key = ‘rate_review’ Now you can add it to your SELECT: rate_review.meta_value AS rate_review