Search
Close this search box.

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 turn your WordPress knowledge into revenue? OF COURSE!

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

  1. 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
  2. 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

Leave a Comment

Share This
Haven’t used Elementor Pro yet?
Hey 👋🏻
Do you have a WP blog?
If so, you may need these. All the resources you need to grow your blog.

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.

Want to Build Passive Income Like the One on the Screenshot Below?

Click the button on the right side to learn how 👉🏻
5 easy steps to turn your WordPress knowledge into monthly recurring revenue.

Click the above button to close the popup.