Сообщество IT-специалистов
Ответы на любые вопросы об IT
Профессиональное развитие в IT
Удаленная работа для IT-специалистов
$args = array( 'number' => '1', 'post_id' => $post->ID ); $comments = get_comments( $args ); foreach ( $comments as $key => $comment ) { echo $comment->comment_content; }
<?php $query_args = array( // Полная документация здесь (wp-kama.ru/function/wp_query) 'posts_per_page' => 15, // Количество анонсов ) ?> <?php $query = new WP_Query( $query_args ); ?> <?php if ( $query->have_posts() ) : ?> <?php while ( $query->have_posts() ) : $query->the_post(); ?> <?php get_template_part ('content-list');?> <?php endwhile; endif; ?>