Possible to have 2 excerpt lengths?
-
I’m using this code to make my post excerpts shorter:
<?php function new_excerpt_length($length) { return 13; } add_filter('excerpt_length', 'new_excerpt_length'); ?> <?php remove_filter('the_excerpt', 'wpautop'); ?>
But there are 2 sections on my blog that require different excerpt lengths. Is it possible to specify 2 excerpt lengths so that I can specify in one of my loops to use the excerpt length from one function and another excerpt length for the other section of my blog?
PS: There are 3 loops on my homepage, but I’m only worried about 2.
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Possible to have 2 excerpt lengths?’ is closed to new replies.