cat_ID;
//echo $cat_ID;
// Here starts the query work.
$is_sticky = get_option('sticky_posts');
$args = array( 'cat' => $cat_ID,
'posts_per_page' => 10,
'ignore_sticky_posts' => false,
//'post__in' => $is_sticky,
'tax_query' => array( array('taxonomy' => 'post_format',
'field' => 'slug',
'terms' => array( 'post-format-quote',
'post-format-aside',
'post-format-status',
'post-format-chat',
'post-format-link',),
'operator' => 'NOT IN',
), ), );
$query = new WP_Query( $args );
echo $query -> the_category();
if ($query->have_posts()):
printf('
', get_category_link($cat_ID), $categories[$key]->name);
while ($query -> have_posts()):$query -> the_post();
// Shows only the posts with standard format.
if ( ! get_post_format() ):
get_template_part( 'template-parts/content', 'article-1-right');
else:
get_template_part('template-parts/content', get_post_format());
endif;
endwhile;
// Previous/next page navigation.
the_posts_pagination( array(
'prev_text' => __( 'Previous page', 'abedul' ),
'next_text' => __( 'Next page', 'abedul' ),
'before_page_number' => '
' . __( 'Page', 'abedul' ) . ' ',
) );
endif;
wp_reset_postdata();
?>