MEET SITKA | A super-customizable modern WP theme!

Okay
  Print

Adjust Grid layout's summary length in Hemlock

Please note: This article is specifically for the Hemlock theme


When you implement the Grid Layout option in Hemlock, it will display a little image thumbnail followed by an excerpt of your post's text. By default, this is set to display 19 words before it ends in a "...". 

If you would like to adjust how many words WordPress displays in your Grid Layout post summary, you can follow the steps below:



Navigate to WP Dashboard > Appearance > Editor > and open up the file titled "functions.php"

Note: Please be very careful what you add or delete in this file as it is very sensitive!

Scroll to the bottom of the document. 
Here, you will see this block of code:

//////////////////////////////////////////////////////////////////
// THE EXCERPT
//////////////////////////////////////////////////////////////////
function custom_excerpt_length( $length ) {
    return 19;
}
add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );

function new_excerpt_more( $more ) {
    return '…';
}
add_filter( 'excerpt_more', 'new_excerpt_more' );


Do you see the number "19" toward the top of the code block?

This is the number which determines how long your Grid Layout post summary will be. You may change this "19" to whatever number you prefer. 

When you're finished, be sure to save changes to the file.