Reply To: Need help to put a default form to each accommodation.

Perfect working properly now!! Thanks

Here is the final code:

$sql = "SELECT post_id FROM " . $wpdb->prefix . "postmeta WHERE meta_key='reservations_releated_post' AND meta_value='". get_the_ID() ."'";
global $wpdb;
$checkQuerry = $wpdb->get_results($sql);
$easy_res_id = $checkQuerry[0]->post_id;
if($easy_res_id > 0 )
echo do_shortcode('[easy_form style="none" room="'.$easy_res_id.'" redirect="THANK-YOU-PAGE" submit="RESERVATION SENT" price="1"]');

  • This reply was modified 3 years, 11 months ago by  Barbio.