I want to show a post with post title and post content of 400/550 words with a read more link in my category page. I have already done this, but problem is, my post doesn't display the excerpt as it should.
This in my code below.
<?php while ( have_posts() ) : the_post(); ?>
<div class="news">
<div class="grid-container">
<h2><a href="<?php the_permalink(); ?>" >
<?php the_title(); ?>
</a><span class="line"></span></h2>
<?php the_post_thumbnail() ?>
</a>
<div class="newsevent"><?php echo substr(get_the_excerpt(), 0,400); ?></div>
<a href="<?php the_permalink(); ?>" class="readmore">View</a> </div>
<?php endwhile;
?>
I suspect I need to change <?php echo substr(get_the_excerpt(), 0,400); ?>