我想在我的主页上限制每个类别2个帖子(类别ID为12,13,16和18),这是我的index.php
内容:
$layout_type_for_index = osetin_get_settings_field('layout_type_for_index');
if(get_query_var('page')){
$paged = ( get_query_var('page') ) ? get_query_var('page') : 1;
}else{
$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
}
if($paged == 1){
$sticky_posts = osetin_get_field('sticky_posts', false, false, true);
}
$os_posts_per_page = osetin_get_number_of_posts_per_page();
$args = array(
'orderby' => 'position',
'order' => 'DESC',
'posts_per_page' => $os_posts_per_page,
'paged' => $paged,
'tax_query' => array()
);
但我不知道怎么做,请帮忙吗?