I have created a custom excerpt length in my functions.php, I would like to extend this function to increase the excerpt length of the first post in a loop.
My function at the moment:
/* Change Excerpt length */
function custom_excerpt_length( $length ) {
return 30;
}
Was thinking of something along these lines
function new_excerpt_length($length) {
global $post;
if ($post-> FIRST POST?)
return 50;
else
return 20;
}
Is there a way of getting post count from $post->?