I'm trying to put a variable inside a wp_query but I can't get it to work. What am I doing wrong?
$stuff = array('easy','medium','hard');
$loop = new WP_Query('category='.$stuff.'&order=asc');
while($loop->have_posts()): $loop->the_post(); ?>
I tried this but it doesn't work:
$stuff = array(
'cat' => array('easy', 'medium', 'hard'),
'orderby' => 'title',
'posts_per_page' => '-1'
);
$loop = new WP_Query($stuff);
Thanks.
$stuff) in middle of your string...