Blog excerpt

Hi guys,
I am using the blog widget (or whatever you call it) on the frontpage of my website. Is there any way to limit the numbers of characters in the excerpt?

175-200 characters would be ideal for me.

Thanks in advance!

Hey Thomas,

Thanks for posting! You should be able to by placing this on your theme’s function.php file(preferably in a child theme).

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

Can be found on the Codex - https://codex.wordpress.org/Function_Reference/the_excerpt

Ben

Thanks Ben. It´s working as intended.
One last question. How to change the font size of the blog module? There are no option like in many of the other modules.

Hi Thomas,

That all depends on the type of layout you have set for the Posts module. Can you shoot us a link with the page in question so we can get some CSS together for you?

Thanks!
Justin

Thanks for the swift reply Justin.

You find the site at http://friskyttarna.eu and it´s the little news blog below the top image. I did however temporarely replace the blog module with the Genesis featured post widget because of the size of the fonts. But if it´s a must for you to help me, i will ofcourse put it back.

Thanks in advance!
Thomas

The blog module is up and running again: http://friskyttarna.eu/

Thanks in advance for the help!

Best regards
Thomas

Hey Thomas,

Try the CSS snippet below and see if they work for you!

/* Change Blog Grid title font size */
.fl-post-grid .fl-post-grid-text .fl-post-grid-title {
  font-size: 20px;
}
/* Change Blog Grid excerpt font size */
.fl-post-grid .fl-post-grid-text .fl-post-grid-content p {
  font-size: 20px;
}

Ben

Perfect.
Many thanks for the help.
It´s much appricated.

Awesome! Have fun with BB! :slight_smile:

Ben