Hi have a category with children categories in it. i want to show almost all categories except for some..
This is pretty much what I want to achieve:
$slug1 = '1998';
$slug2 = '1999';
$slug3 = '2000';
$slug4 = '2001';
$slug5 = '2002';
$cat1 = get_category_by_slug($slug1);
$cat2 = get_category_by_slug($slug2);
$cat3 = get_category_by_slug($slug3);
$cat4 = get_category_by_slug($slug4);
$cat5 = get_category_by_slug($slug5);
$the_query = new WP_Query( array (
'orderby' => 'rand',
'posts_per_page' => '1',
'category_name' => 'idols',
'category__not_in' => -$cat1, -$cat2, -$cat3, -$cat4, -$cat5
) );
But won't work... Any ideas?