Skip to Main Content Skip Table of Content

How to Fix the Post Excerpt Length not working In the Elementor Post Widget with CSS

In this tutorial, I am going to show you how to fix the post excerpt length not working in Elementor post widget's with the help of CSS

Post Excerpt Length Not Working in Post Widget

UPDATE: Today (11the May 2022) Elementor pro released version 3.7 which includes the feature to “Apply to custom Excerpt” this fixes the excerpt length issue.

Excerpt length issue

The Excerpt Length in the post widget’s layout panel does not match the number you put in the field.

It is quite frustrating and leaves a huge space in between the content when you disable the masonry option.

Excerpt Length is not working in Post widget even though if you applied it

This happened to my blog page before and now it is fixed with the help of CSS.

That I want to show you how I did it step-by-step

Applied excerpt length is not working in the Elementor  post widget

This happens when you disable the Masonry effects

After adding the CSS, it fixed the issue

equal height is achieved with some CSS

You can see, that I am not the only one who has this issue. See it for yourselves-

  1. Elementor’s forum
  2. GitHub

Here is the step-by-step tutorial on how to fix the Excerpt Length issue in the post widget with the help of CSS:

Provide CSS class to the post widget

Step#1(A): Click the Post widget handle and navigate to the Advanced tab-

Click the pencil icon to edit the post widget

Post widget handle advanced tab

Step#1(B): Give CSS class to the post widget

CSS class to Post widget- Advanced panel

Add Custom CSS to fix the excerpt length issue

We are going to use the -webkit-line-clamp CSS property to limit the contents to the specified number of lines.

The -webkit-line-clamp CSS property allows limiting of the contents of a block container to the specified number of lines.

It only works in combination with the display property set to -webkit-box or -webkit-inline-box and the -webkit-box-orient property set to vertical.

In most cases you will also want to set overflow to hidden, otherwise the contents won’t be clipped but an ellipsis will still be shown after the specified number of lines.

When applied to anchor elements, the truncating can happen in the middle of the text, not necessarily at the end.

On the bottom of the panel, you will find Custom CSS, and there add this CSS.

With LIne-clamp CSS property we limit the length of the lines

This CSS only works with post excerpt

    * This CSS only works with post excerpt
    * Adjust the line-clamp integer value.
    * Require Browser prefix to work. 
    * You can use the selector but using CSS class is much better

.line-height .elementor-post__excerpt,
.line-height .elementor-post__excerpt p{
 -webkit-line-clamp: 3;     
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;



When we use new CSS property, we often ask whether it is going to be compatible with the majority of the browser vendors but it turns out it supports over 95% globally which is excellent and safe to use.
  1. Can I use
  2. MDN Article
MDN shows 96% supports Can I use Browser Compatibility check passes over 97% global use Hope it helps. Cheers
Thangjam Kishorchand

Thangjam Kishorchand

Hi there, this is my place where I write about my Elementor tips and tricks that I learned for the last 2 years. I am mostly active on Quora and Facebook. I love messing around with design trends like Variable Fonts, Dark Mode

Powered by Elementor pro

This site is powered by Elementor pro : Theme builder and it contains Affiliate links,which means that if you buy from my links, Foxscribbler will earn a small commission.This commission comes at no additional cost to you.

Scroll up further to Load all the comments...