'; echo '

'.esc_attr($category_info->name).'

'; echo '
'; $block1_args = array( 'category_name'=>$block1_cat, 'post_status'=>'publish', 'posts_per_page'=>$posts_for_block1, 'order'=>'DESC' ); $block1_query = new WP_Query($block1_args); $b_counter = 0; $total_posts_block1 = $block1_query->found_posts; if($block1_query->have_posts()){ while($block1_query->have_posts()){ $b_counter++; $block1_query->the_post(); $b1_image_id = get_post_thumbnail_id(); $b1_big_image_path = wp_get_attachment_image_src($b1_image_id,'accesspress-mag-block-big-thumb',true); $b1_small_image_path = wp_get_attachment_image_src($b1_image_id,'accesspress-mag-block-small-thumb',true); $b1_image_alt = get_post_meta($b1_image_id,'_wp_attachment_image_alt',true); ?> ';} if($b_counter> 2 && $b_counter==3){echo '
';}?>
<?php echo esc_attr($b1_image_alt);?>

'. accesspress_mag_word_count( get_the_content(), 25 ) .'

' ;?>
';} if($b_counter >2 && $b_counter==$total_posts_block1){echo '
';} if($b_counter==2){echo '
';} ?> '; echo '
'; endif; wp_reset_query(); ?>
'; echo '

'.esc_attr($category_info_2->name).'

'; echo '
'; $block2_args = array( 'category_name'=>$block2_cat, 'post_status'=>'publish', 'posts_per_page'=>$posts_for_block2, 'order'=>'DESC' ); $block2_query = new WP_Query($block2_args); $b_counter = 0; $total_posts_block2 = $block2_query->found_posts; if($block2_query->have_posts()){ while($block2_query->have_posts()){ $b_counter++; $block2_query->the_post(); $b2_image_id = get_post_thumbnail_id(); $b2_big_image_path = wp_get_attachment_image_src($b2_image_id,'accesspress-mag-block-big-thumb',true); $b2_small_image_path = wp_get_attachment_image_src($b2_image_id,'accesspress-mag-block-small-thumb',true); $b2_image_alt = get_post_meta($b2_image_id,'_wp_attachment_image_alt',true); ?> ';} if($b_counter>1 && $b_counter==2){echo '
';}?>
<?php echo esc_attr($b2_image_alt);?>

'. accesspress_mag_word_count( get_the_content(), 25 ) .'

' ;?>
';} if($b_counter>1 && $b_counter==$total_posts_block2){echo '
';}?> '; echo '
'; endif ; ?>
'; echo '

'.esc_attr($category_info_3->name).'

'; echo '
'; $block3_args = array( 'category_name'=>$block3_cat, 'post_status'=>'publish', 'posts_per_page'=>$posts_for_block3, 'order'=>'DESC' ); $block3_query = new WP_Query($block3_args); $b_counter = 0; $total_posts_block3 = $block3_query->found_posts; if($block3_query->have_posts()){ while($block3_query->have_posts()){ $b_counter++; $block3_query->the_post(); $b3_image_id = get_post_thumbnail_id(); $b3_big_image_path = wp_get_attachment_image_src($b3_image_id,'accesspress-mag-block-big-thumb',true); $b3_small_image_path = wp_get_attachment_image_src($b3_image_id,'accesspress-mag-block-small-thumb',true); $b3_image_alt = get_post_meta($b3_image_id,'_wp_attachment_image_alt',true); ?> ';} if($b_counter> 2 && $b_counter==3){echo '
';}?>
<?php echo esc_attr($b3_image_alt);?>

'. accesspress_mag_word_count( get_the_content(), 25) .'

' ;?>
';} if($b_counter >2 && $b_counter==$total_posts_block3){echo '
';} if($b_counter==2){echo '';} ?> '; echo ''; endif; ?>
'; echo '

'.esc_attr($category_info_4->name).'

'; echo '
'; $block4_args = array( 'category_name'=>$block4_cat, 'post_status'=>'publish', 'posts_per_page'=>$posts_for_block4, 'order'=>'DESC' ); $block4_query = new WP_Query($block4_args); $b_counter = 0; $total_posts_block4 = $block4_query->found_posts; if($block4_query->have_posts()){ while($block4_query->have_posts()){ $b_counter++; $block4_query->the_post(); $b4_image_id = get_post_thumbnail_id(); $b4_big_image_path = wp_get_attachment_image_src($b4_image_id,'accesspress-mag-block-big-thumb',true); $b4_image_alt = get_post_meta($b4_image_id,'_wp_attachment_image_alt',true); ?>
<?php echo esc_attr($b4_image_alt);?>

';}?> '; echo ''; endif ; ?>
ID, 'accesspress_mag_page_sidebar_layout', true); if($page_sidebar!='no-sidebar'){ get_sidebar('home'); } ?>