Function to limit the words in a post content by id
Description
This function will limit the number words or characters in a post content by ID. Change “50” to the number of the desired words and change 55 to the id of the post that you want to limit
This function will limit the number words or characters in a post content by ID. Change “50” to the number of the desired words and change 55 to the id of the post that you want to limit
HTML Source Code
<?php query_posts('p=55');
while (have_posts()): the_post(); ?>
<?php echo wp_trim_words( get_the_content(), 50, '...' ); ?>
<?php endwhile; ?>