Multiple categries doesn't work | array('category'=> ?!
-
Hello,
I can’t solve my problem and can’t find any solution.
I have a query and want only two catgories in it.
“Neuigkeiten” & “Wettbewerbe”.I did an array, but it doesn’t work:
<?php $query = new WP_Query(array('category_name' => array('Neuigkeiten','Wettbewerbe'), 'posts_per_page' => 4, )); while ($query->have_posts()): $query->the_post(); ?>
This doesn’t work:
<?php $query = new WP_Query(array('cat' => array('1','10'), 'posts_per_page' => 4, )); while ($query->have_posts()): $query->the_post(); ?>
This doesn’t work:
<?php $query = new WP_Query(array('category__in' => array('Neuigkeiten','Wettbewerbe'), 'posts_per_page' => 4, )); while ($query->have_posts()): $query->the_post(); ?>
Do you have any ideas?
Thank you.
- The topic ‘Multiple categries doesn't work | array('category'=> ?!’ is closed to new replies.