cat_name] = $category->cat_ID;
}
$options_cat_id = array();
if($options_categories){
foreach ( $options_categories as $cat_name => $cat ) {
if( !empty($blog_categories ) ){
if ( !in_array($cat_name, $blog_categories) ) { $options_cat_id[]= $cat; }
}
}
}
global $wpdb;
$myosts = new WP_Query();
if(empty($options_cat_id)){
$myosts->query( array(
'showposts' => $blog_article_number,
'ignore_sticky_posts' => 1,
));
}else{
$myosts->query( array(
'showposts' => $blog_article_number,
'ignore_sticky_posts' => 1,
'category__in' => $options_cat_id,
));
}
if ( $myosts->have_posts() ) : while ( $myosts->have_posts() ) : $myosts->the_post();
?>