Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- * GET ALL THE QUERY VARIABLES ($_GET[])
- */
- $name = $_GET['name'] != '' ? $_GET['name'] : '';
- $passport = $_GET['passport'] != '' ? $_GET['passport'] : '';
- $h_id = $_GET['h_id'] != '' ? $_GET['h_id'] : '';
- $father_husband = $_GET['father_husband'] != '' ? $_GET['father_husband'] : '';
- $mother = $_GET['mother'] != '' ? $_GET['mother'] : '';
- $location_id = $_GET['locations'] != '' ? $_GET['locations'] : '';
- $age_range = $_GET['age'];
- $age_array = explode('-', $age_range);
- $args = array(
- //'post_type' => array( 'hajji', 'flights', 'moallem' ),
- 'post_type' => 'hajji',
- 'post_status' => 'publish',
- 's' => $name,
- 'tax_query' => array(
- array(
- 'taxonomy' => 'locations',
- 'field' => 'id',
- 'terms' => $location_id
- ),
- ),
- 'meta_query' => array(
- 'relation' => 'OR',
- array(
- 'key' => 'hajji_id',
- 'value' => $h_id,
- 'type' => 'numeric',
- 'compare' => '=',
- ),
- array(
- 'key' => 'hajji_father_husband',
- 'value' => $father_husband,
- 'type' => 'CHAR',
- 'compare' => '=',
- ),
- array(
- 'key' => 'hajji_mother',
- 'value' => $mother,
- 'type' => 'CHAR',
- 'compare' => '=',
- )
- )
- );
- $hajji_query = new WP_Query( $args );
- var_dump($hajji_query);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement