Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function submit(){
- $args = array(
- //'showposts'=> 3,
- 'post_type' => 'product',
- //'post_status' => 'publish,pending',
- 'meta_query' => array(
- 'relation' => 'AND',
- array(
- 'key' => 'country',
- 'value' => $_GET['destination'],
- 'type' => 'CHAR'
- ),
- array(
- 'key' => 'days',
- 'value' => $_GET['days'],
- 'type' => 'NUMERIC'
- ),
- array(
- 'key' => 'budget',
- 'value' => $_GET['budget'],
- 'type' => 'NUMERIC'
- )
- ),
- );
- //var_dump($args);
- $query = new WP_Query();
- $query->query( $args );
- //The loop
- while ($query->have_posts() ) : $query->the_post();
- //get_template_part( 'content', get_post_format() );
- echo '<h1><a href="' . the_permalink() . '">' . the_title(); '</a></h1>';
- endwhile;
- //var_dump($query);
- }
- //var_dump($args);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement