Welcome! To use this support forum, please Login or Join Today!

   

Unable to adjust ‘length’ in [latest] shortcode

{name}
RankRank

Total Posts: 45

Joined 2013-06-24

PM

 

I have the following code in the page but the length refuses to shorten to less than 300

[latest excerpt="true" length="100" num="3" cat="3"

This is the page it is on:  http://investresource.test-lca-website.com/

I’m trying to get the table there to be more balanced.  Just the headings were too sparse and the excerpt would be great, if I could control it :/  Did I break it somehow?

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

Hi,

First, the limit parameter limits words not characters.
The limit parameter also runs the filter on the_excerpt() which returns 45 words by default. If you want to filter through more words, you’ll need to override this in your child theme with this function:

function smpl_excerpt_length( $length ) {
 return 45;
}
add_filter( 'excerpt_length', 'smpl_excerpt_length' );
{name}
RankRank

Total Posts: 45

Joined 2013-06-24

PM

 

Hi Casey,

Thanks for the response.

Err, the documentation says “length // excerpt character length (number)”.  Hence my wording.  That’s a auote directly from the docs/info page.  Still, knowing the correct meaning, it’s all good now smile

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

I’ll be sure to update that. Glad you got it resolved.

{name}
RankRank

Total Posts: 45

Joined 2011-09-28

PM

 

Documentation stills has “excerpt character length” instead of word length.
http://themes.simplethemes.com/synapse/latest-posts-shortcode-documentation

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

Thanks. Updated!