добавьте этот код в ваши functions.php
function excerpt_bz( $content, $limit=25, $endPoints = '[...]', $tags_accepts = '' ) {
$excerpt = explode(' ', strip_tags($content, $tags_accepts), $limit);
if (count($excerpt)>=$limit) {
array_pop($excerpt);
$excerpt = implode(" ",$excerpt).' '.$endPoints;
} else {
$excerpt = implode(" ",$excerpt);
}
return $excerpt;
}
обратите внимание, что это извлекает содержимое и обрезает его, и вы передаете разрешенные данные
<?php while ( have_posts() ) : the_post() ?>
<div id="post-<?php the_ID() ?>" class="<?php /*sandbox_post_class()*/ ?>">
<div class="entry-meta clearfix">
<h2 class="entry-title"><a href="<?php the_permalink() ?>" title="<?php printf(__('Permalink to %s', 'sandbox'), wp_specialchars(get_the_title(), 1)) ?>" rel="bookmark"><?php the_title() ?></a></h2>
</div>
<div class="entry-content">
<p class="thePic clearfix">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<!--here you have greater control -->
<figure>
<?php get_the_post_thumbnail('thumbnail'); ?>
</figure>
</a>
</p>
<p>
<!-- use ( note that this function you need to fill the field in the panel in wp )-->
<?php the_excerpt(); ?>
<!-- or (note that this pulls the content and cuts it and you pass the allowed data) -->
<?php echo excerpt_bz( get_the_content(), 500, '...', '<a><p><br><strong><em>' ) ?>
<a href="<?php the_permalink() ?>" title="<?php printf(__('Permalink to %s', 'sandbox'), wp_specialchars(get_the_title(), 1)) ?>" rel="bookmark">Read More</a>
</p>
</div><!-- .entry-content -->
</div><!-- .post -->
<?php endwhile ?>