[Resolved] Changing the default length of the_excerpt
On my new site I’m using the following to pull up a list of recent posts & their excerpts on the sidebar:
<?php query_posts('showposts=10'); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <li><strong><a href="<?php the_permalink() ?>"><?php the_title() ?> </a></strong></li> <?php the_excerpt() ?> <?php endwhile; endif; ?>
Does anyone know of a way to shorten the length of the_excerpt?
I’m looking for a way for customise the excerpt length automatically, to something more brief, say, ten words.
I’m aware of the custom field, but adding an excerpt to that extra field (for each post) would be very time-consuming since I post at least once a day – I would have to count out the correct length of excerpt, and then paste it in, every time I post.
Not ideal for a fast-moving blog!
Thanks in advance, MS
- The topic ‘[Resolved] Changing the default length of the_excerpt’ is closed to new replies.