<?php
/**
* Template name: Result Page
*/
$se1=$_REQUEST[‘sel1’];
$se2=$_REQUEST[‘sel2’];
$se3=$_REQUEST[‘sel3’];
$se4=$_REQUEST[‘sel4’];
$se5=$_REQUEST[‘sel5’];
$se6=$_REQUEST[‘sel6’];
$ch1=$_REQUEST[‘check1’];
$ch2=$_REQUEST[‘check2’];

get_header(); ?>
<section class=”singlepage”>
<div class=”leftside”>
<?php get_sidebar(‘mainmenu’); ?>

</div>
<?php if(ale_get_option(‘rightsidebarcustom’)==1){ ?>
<div class=”rightsidebar”>
<?php include ‘templates/sidebar-right-custom.php’; ?>
</div>
<?php } ?>
<div class=”rightside <?php if(ale_get_option(‘rightsidebarcustom’)==1){ echo ‘centerside’; } ?>”>
<div class=”margincontentbox”>
<div class=”pagelayout cf”>

<section class=”berater cf”>

<div class=”image-box”>
<img src=”../wp-content/themes/socha-child-theme/images/camp-img.jpg” alt=”camp-img”>
</div>

<div class=”berater-block”>

<h1><?php the_title(); ?></h1>

<?php
$args = array(
‘post_type’ => ‘surfcamp’,
‘relation’ => ‘OR’,
‘meta_query’ => array(
‘relation’ => ‘OR’,
array(
‘key’ => ‘monat’,
‘value’=> $se1,
‘compare’ => ‘LIKE’,
),
array(
‘key’ => ‘leistungen’,
‘value’ => $se3,
‘compare’ => ‘LIKE’,
),
array(
‘key’ => ‘unterkunft’,
‘value’ => $se4,
‘compare’ => ‘LIKE’,
),
/* array(
‘key’ => ‘genre’,
‘value’ =

> $searchvalue,
‘compare’ => ‘LIKE’
)
),
array(
‘key’ => ‘rating’,
‘value’ => $ratingvalue,
‘compare’ => ‘=’,
‘type’ => ‘NUMERIC’

) */
)
);

/* $args = array(
‘post_type’ => ‘surfcamp’,
‘meta_query’ => array(
‘relation’ => ‘OR’,
‘monat’ => array(
‘key’ => ‘monat’,
‘value’=> $se1,
‘compare’ => ‘LIKE’,
),

array(
‘key’ => ‘leistungen’,
‘value’ => $se3,
‘compare’ => ‘LIKE’
),
‘leistungen’ => array(
‘key’ => ‘leistungen’,
‘value’ => $se3,
‘compare’ => ‘IN’,
),

/* ,
array(
‘key’ => ‘unterkunft’,
‘value’ => $se4
),

array(
‘key’ => ‘durchschnittsalter’,
‘value’ => $se5
),
array(
‘key’ => ‘anreise’,
‘value’ => $se6
),
array(
‘key’ => ‘welche_zusatzleistungen_des_camps_sind_dir_noch_wichtig’,
‘value’ => $ch1
),
array(
‘key’ => ‘was_ist_dir_noch_besonders_wichtig’,
‘value’ => $ch2
), */
//)
//);
$query = new WP_Query( $args );
echo ‘<pre>’,print_r($query),'</pre>’;
//print_r($query);

?>

<?php if($query->have_posts()): while($query->have_posts()): $query->the_post(); ?>
<h2><a href=”<?php the_permalink(); ?>”><?php the_title(); ?></a></h2>

<?php endwhile; endif; ?>
</div>

</section>

</div>
</div>
</div>
<div class=”cf”></div>
</section>
<?php get_footer(); ?>