$n_of_home_post,
'cat' => self::remove_last_comma($content_post_categories),
'paged'=> $paged,
'order'=>'DESC',
//'post__in' => get_option( 'sticky_posts' ),
//'ignore_sticky_posts' => 1
);
}
else{
$args = array(
'posts_per_page' => $n_of_home_post,
'paged'=> $paged,
'order'=>'DESC',
);
}
$wp_query = new WP_Query($args);
if(have_posts()):
while ($wp_query->have_posts()):
$wp_query->the_post();
$post_count++;
$tumb_id = get_post_thumbnail_id( get_the_ID() );
$thumb_url=wp_get_attachment_image_src($tumb_id,'full');
if( $thumb_url ){
$thumb_url = $thumb_url[0];
}
else{
$thumb_url = self::catch_that_image();
}
if(isset( $thumb_url['image_catched'])){
if(!$thumb_url['image_catched']){
$thumb_url='';
}
else{
$thumb_url=$thumb_url['src'];
}
}
if($post_count==5){
?>
max_num_pages > 2 ){ ?>
bottom_advertisment();
wp_reset_query();
?>
';
if ( $categories_list ) {
echo '