display x ammount of words in a post
-
Hi!
I’m doing a startpage with 4 different loops displaying the latest post from the 4 categories. So far, everything is all good.
The thing I wonder though is how I can specify (and if I can) how many words I want to show from the posts without the user (in this case me) have to decide when to cut.
For example, I want to display the first 100 words from the post.
I’m currently using the following code to pull the latest post:
<?php query_posts('cat=5&showposts=1'); ?> <?php while (have_posts()) : the_post(); ?> <?php the_content('Read the rest of this entry »'); ?> <?php endwhile;?>
I’d also like to stay away from plugins as far as I can.
Thank you!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘display x ammount of words in a post’ is closed to new replies.