Slick slider for post doesn't display anything
I want to make a testimonial slider with slick from https://kenwheeler.github.io/slick/. i use WP_Query for get the post with specific category. the slick works finde but it doesn't show the content. This is my PHP code:
div class=" container"
div id="testimoni-carousel" class='row testimoni-carousel' dir="rtl"
?php
$args = array(
'post_type'= 'post',
'category_name' = 'komentar'
);
$query = new WP_Query( $args );
if ( $query-have_posts() ) {
while ( $query-have_posts() ) {
$query-the_post();
?
div class='text-center testimoni-teks col-12'
h2 class='text-white'?php the_title() ?/h2
div class='text-white'?php the_content() ?/div
/div
?php
}
wp_reset_postdata();
}
?
/div
/div
and this my JS file:
jQuery(document).ready(function($) {
$('#testimoni-carousel').slick({
dots: true,
slidesToShow: 1,
slidesToScroll: 1
});
});