How to Fix Excerpt Length Not Working in Elementor

Elementor Pro comes with a Posts widget that allows you to display the posts on your website by a certain query. There are lots of settings you can set when working with the Posts widget, including the excerpt length. There is a common issue regarding the excerpt length in Elementor. In some cases, the excerpt length setting not working when the page has been published (or previewed), even if the excerpt length has been set.

For instance, you have set the excerpt length to 15. This means, the excerpt length of each post supposed to 15 words.

In reality — once the page is published or previewed — the excerpt length is longer than that (more than 15 words).

We are not sure whether this is a serious bug or not, but it doesn’t happen to all WordPress themes. If you use Elementor’s Hello theme or WordPress’ default themes, you might don’t experience the same issue. The issue usually happens on WordPress themes that have an option to set the excerpt length (not all WordPress themes offer an option set the excerpt length).

So, if you are experiencing the issue of the excerpt length setting not working when working with the Posts widget in Elementor, while you have set it, you can go to the WordPress theme customizer (Appearance -> Customize) to fix the problem. The setting location to set the excerpt length might be vary depending on the theme you use. On the Agency Plus theme, you can go to Theme Options -> Blog/Archive.

This page may contain affiliate links, which help support our project. Read our affiliate disclosure.
Picture of Aliko Sunawang

Aliko Sunawang

Aliko is a WordPress expert and lead blogger at WPPagebuilders. He has been blogging with WordPress since 2013. He is responsible of all content published on this website. Learn more
Want to start a profitable blog with WordPress? OF COURSE!

4 thoughts on “How to Fix Excerpt Length Not Working in Elementor”

  1. This is my solution, maybe help someone:
    image

    function summary($content, $limit = 200) {
    $content = strip_tags($content);
    // Take the existing content and return a subset of it
    $end = ”;
    if (strlen($content) > $limit) {
    $end = ‘…’;
    }
    return substr($content, 0, $limit) . $end;
    }

    add_action( ‘elementor_pro/posts/query/custom_excerpt’, function( $query ) {

    function trimTitle( $text, $id = null ) {
    return summary($text,80);
    }

    function trimExcerpt( $text, $id = null ) {
    return wpautop(summary($text,110));
    }

    add_filter( ‘the_title’, ‘trimTitle’, 10, 2 );
    add_filter( ‘the_excerpt’, ‘trimExcerpt’, 10, 2 );

    } );

    Reply
  2. I’ve made all the changes you suggested, but still can’t get Elementor to show excerpts on my site – the preview is perfect as well as mobile views – but the desktop page looks AWFUL!

    https://www. melodyhogan.com/blog

    Any thoughts for a work-around?

    Reply

Leave a Comment

Want to outrank big websites on Google?

Without backlinks, without high DR, without digital PR. Just content optimization.

Click to enlarge.

Haven’t used Elementor Pro yet?
Hey 👋🏻
Got WordPress knowledge?
Why not turning it into profit? Click the button below to learn how.

Your popup content goes here

50%

Where should we send the template?

After entering your email address, you will be added to our newsletter subscribers. You can unsubscribe anytime.