<main id="main" class="site-main" role="main">
<?php if ( have_posts() ) : $n = 1; ?>
<?php /* Start the Loop */ ?>
<div class="posts-loop">
<?php while ( have_posts() ) : the_post();
$class = $n % 5 === 0 || $n === 1 ? ' class-5' : ''; ?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'list-post grid_item' . $class ); ?> >
<?php
/* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'template-parts/' . $post_template );
?>
</article>
<?php $n++; endwhile; ?>
</div><!-- / .posts-loop -->
<div class="postnav">
<?php if ( function_exists( 'wp_pagenavi' ) ) {
wp_pagenavi();
} ?>
</div>
<?php else : ?>
<?php get_template_part( 'template-parts/content', 'none' ); ?>
<?php endif; ?>
</main><!-- #main -->
//Здесь вся информация постов и т.д.
В режиме разработчика в гугл хром напротив файлов стилей указан статус 404.
the_field('services_number', $post->ID);
, судя по всему она получает и вывводит на экран значение некоего поля services_number$tax_name = "category";
$terms_per_page = 10;
$terms = get_terms( $tax_name );
$current = (int) get_query_var( 'paged' ) ? (int) get_query_var( 'paged' ) : 1;
global $wp_rewrite;
$pagination_args = array(
'base' => add_query_arg( 'paged', '%#%' ),
'format' => '',
'total' => ceil( count( $terms ) / $terms_per_page ),
'current' => $current,
'show_all' => false,
'type' => 'plain',
'prev_next' => true,
'prev_text' => __( '«' ),
'next_text' => __( '»' )
);
if ( $wp_rewrite->using_permalinks() ) {
$pagination_args[ 'base' ] = user_trailingslashit( trailingslashit( remove_query_arg( 's', get_pagenum_link( 1 ) ) ) . 'page/%#%/', 'paged' );
}
if ( ! empty( $wp_query->query_vars[ 's' ] ) ) {
$pagination_args[ 'add_args' ] = array( 's' => get_query_var( 's' ) );
}
$start = ( $current - 1 ) * $terms_per_page;
$end = ( count( $terms ) < $start + $terms_per_page ) ? count( $terms ) : $start + $terms_per_page;
$str = '';
for ( $i = $start; $i < $end; ++ $i ) {
$term = $terms[ $i ];
$str .= sprintf( '<li class="term-item"><a href="%1$s" title="%2$s">%2$s</a></li>',
get_term_link( (int) $term->term_id, $tax_name ),
$term->name
);
}
printf( '<ul>%s</ul><nav class="navigation pagination"><div class="nav-links">%s</div></div>',
$str,
paginate_links( $pagination_args )
);