WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] excerpt lengths show first full sentance (4 posts)

  1. oldbag66
    Member
    Posted 4 years ago #

    Ive got the excerpt length working in my function.php file, however i was wondering if its possible to make the excerpt length stop at the end of the first sentence, in other words stop at the first full stop in the post rather than after..say 20 words.

  2. Jorge A. Gonzalez
    Member
    Posted 3 years ago #

    There should be an option for this in the next release.

  3. chinmoy
    Member
    Posted 3 years ago #

    function custom_excerpt_length( $length ) {
    	return 40;
    }
    add_filter( 'excerpt_length', 'custom_excerpt_length' );

    Try this code. 40 will be change according to your choice

  4. oldbag66
    Member
    Posted 3 years ago #

    thanks

Topic Closed

This topic has been closed to new replies.

About this Topic