<ol class="commentlist">
<?php
// Получаем комментарии поста с ID XXX из базы данных
$comments = get_comments(array(
'post_id' => XXX,
'status' => 'approve' // комментарии прошедшие модерацию
));
// Формируем вывод списка полученных комментариев
wp_list_comments(array(
'per_page' => 10, // Пагинация комментариев - по 10 на страницу
'reverse_top_level' => false // Показываем последние комментарии в начале
), $comments);
?>
</ol>
<ol class="commentlist">
<?php wp_list_comments(); ?>
</ol>
/* Ajax Post */
add_action( 'wp_ajax_theme_post_example', 'theme_post_example_init' );
add_action( 'wp_ajax_nopriv_theme_post_example', 'theme_post_example_init' );
function theme_post_example_init() {
/* Made Query */
$args = array( 'p' => $_POST['id'],'post_type' => array( 'post', 'page', 'track' ) );
$theme_post_query = new WP_Query( $args );
while( $theme_post_query->have_posts() ) : $theme_post_query->the_post();
?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'has_post_thumbnail' );
$url = $thumb['0']; ?>
<div class="animation-fadeIn">
<div id="post-div-pic0" style="overflow: hidden;">
<div id="post-div-pic1" style="background-image: url(<?=$url?>); animation: fade-in .5s linear; @keyframes fade-in {0%{ opacity: 0; }100%{ opacity: 1;}}">
<img src="<?=$url?>" width="0" height="0">
</div>
</div>
<div id="posttex" style="animation: fade-in .5s linear; @keyframes fade-in {0% { opacity: 0; }100%{ opacity: 1;} };">
<h2><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr( 'Permalink to %s' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<div class="entry-content"><?php the_content(); ?>
</div><!-- end .entry-content -->
</div>
</div>
<script src="http://inst:8888/wp-content/themes/inst/js/slick.min.js?ver=20151215"></script>
</div>
<?php
endwhile;
exit;
}
так будет правильно?