Answer the question
In order to leave comments, you need to log in
the_excerpt() function does not work, what should I do?
the_excerpt() function does not work, what should I do?
<?php if (have_posts()) { while (have_posts()) { the_post(); ?>
<div class="contentItem">
<a href="<?php the_permalink(); ?>" class="news__link"><?php the_title(); ?></a>
<p class="news__date">Опубликовано: <?php the_date(); ?></p>
<?php the_post_thumbnail( 'thambnail' ) ?>
<div class="news__text">
<?php the_excerpt(); ?>
</div>
</div>
<?php } // конец while ?>
<?php the_posts_pagination(); ?>
<?php } // конец if ?>
Answer the question
In order to leave comments, you need to log in
Maybe there is something in the logs? Try echo get_the_excerpt();
I also had a similar problem. I wrote <?the_excerpt();?> instead of <?php the_excerpt();?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question