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 )
);
($m_wpdb->prepare("call p_val_get));
как минимум тут кавычки не закрыты