[resolved] excerpts with different lengths? (3 posts)

  1. jynk
    Posted 2 years ago #

    I've used boilerplate_excerpt_length to change the default length. How can i create and excerpt with an alternative length for different pages?

  2. Thimothe
    Posted 2 years ago #

    This article might be useful for what you're looking for: Multiple excerpt lengths.

    The code will vary depending on what you are trying to achieve.

  3. Aaron T. Grogg
    Theme Author

    Posted 2 years ago #

    That function, which can be found starting line 259 of the function.php file, has a built-in default of 40, but you can pass any length in that you want:

    function boilerplate_excerpt_length( $length ) {
    	return 40;

    So, you can use any method of determining which page you are on in your post/page templates, then simply pass that length value to the boilerplate_excerpt_length function.

    Hope this helps,

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic