Главную страницу создавал отдельно, задал новый шаблон страниц и в нем сверстал. Так что можно добавить любые коды.
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#projects" aria-controls="projects" role="tab" data-toggle="tab">Все проекты</a></li>
<?php
$args = array(
'taxonomy' => 'afisha_kat',
'hide_empty' => true,
);
$terms = get_terms( $args );
foreach ($terms as $term) { ?>
<li role="presentation"><a href="#<?php echo $term->slug;?>" aria-controls="<?php echo $term->slug;?>" role="tab" data-toggle="tab"><?php echo $term->name; ?></a></li>
<?php }?>
</ul>
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="projects">
<?php
$args = array(
'post_type' => 'afisha',
'posts_per_page' => 8,
);
$query = new WP_Query( $args );
if ( $query->have_posts() ) : ?>
<?php while ( $query->have_posts() ) : $query->the_post(); ?>
<a href="<?php the_permalink();?>">
<figure class="project-thumb">
<?php the_post_thumbnail()?>
</figure>
<p class="project-descr">
<?php the_title();?>
</p>
</a>
<?php endwhile; ?>
</div>
<?php
endif; wp_reset_postdata(); ?>
</div>
<?php
$args = array(
'taxonomy' => 'afisha_kat',
'hide_empty' => true,
);
$terms = get_terms( $args );
foreach ($terms as $term) { ?>
<div role="tabpanel" class="tab-pane" id="<?php echo $term->slug;?>">
<div class="projects-grid">
<ul class="project-tabs-items">
<?php
$args = array(
'post_type' => 'afisha',
'posts_per_page' => 3,
'tax_query' => array(
array(
'taxonomy' => 'afisha_kat',
'field' => 'slug',
'terms' => $term->slug,
)
)
);
$query = new WP_Query( $args );
if ( $query->have_posts() ) : ?>
<?php while ( $query->have_posts() ) : $query->the_post(); ?>
<li>
<a href="<?php the_permalink();?>">
<figure class="project-thumb">
<?php the_post_thumbnail('project-thumb')?>
</figure>
<p class="project-descr">
<?php the_title();?>
</p>
</a>
</li>
<?php endwhile; ?>
<?php
endif; wp_reset_postdata(); ?>
</ul>
</div>
</div>
<?php } ?>
</div>