Cut post card excerpts off after three lines with an ellipsis, so cards in a grid line up neatly.
/* Change the selector to match your theme's excerpt or card text. */
.entry-summary p,
.wp-block-post-excerpt__excerpt {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
line-clamp: 3;
overflow: hidden;
}
Excerpts of different lengths make post grids look ragged. Clamping them to the same number of lines keeps every card the same height without editing a single excerpt.
The line clamp properties show only the first three lines and add “…” where the text is cut. All current browsers support -webkit-line-clamp, including Firefox and Safari; line-clamp is the future standard name.
The full text is still in the page, so search engines and screen readers get all of it.
Open your blog page. Every excerpt should stop after three lines with an ellipsis.