I have the following wp query:
$keyword = $_GET['se'];
$args = array(
's' => $keyword,
'post_type' => 'page',
'posts_per_page' => '10',
'meta_query' => array(array('key' => 'Active','value' => 'yes' ),
array('key' => '_wp_page_template','value' => 'default' )
),
'orderby' => 'post_date',
'order' => 'DESC',
'showposts' => -1,
'paged' => $paged
);
$qu = new WP_Query($args);
while ( $qu->have_posts() ) :
$qu->the_post();
the_title();
the_excerpt();
endwhile;
wp_reset_postdata();
?>
If I don’t include ‘s’ => $keyword, it returns what you would expect but as soon as I include said keyword it returns nothing. The keyword does have matches in the DB.
Anyone know why? And where am I going wrong here?
Thanks