Issue: out-of-box, Elementor Pro has its own way of displaying the excerpt within a posts widget – it usually* ignores all the settings from the theme and plugins which offer more control, such as the Advanced Excerpt plugin.

Make Elementor Pro implement your settings from the Advanced Excerpt Plugin

Prerequisites

This tutorial assumes that you already have Elementor, Elementor Pro, and Advanced Excerpt plugins installed.

Step 1

Add the following code to functions.php or to a new code snippet using the Code Snippets Plugin.

add_action( 'elementor_pro/posts/query/use_advanced_excerpt', function( $q ) {
	global $advanced_excerpt;
	remove_all_filters( 'get_the_excerpt' );
	remove_all_filters( 'the_excerpt' );
	add_filter( 'get_the_excerpt', array( $advanced_excerpt, 'filter_excerpt' ) );
	return $q;
} );

Step 2

Open the page containing Elementor’s Posts widget in the Elementor editor.

Edit the Post widget that you want using settings from Advanced Excerpt.

Open the Query tab.

Add the value use_advanced_excerpt to the field Query ID.

Preview the page to make sure it looks right.

Publish the page.

Notes

I will be updating this article soon with screenshots and more helpful tips soon. This has been plaguing users for quite some time, so I wanted to get this out there ASAP. I will also work on making the code a little more plug-and-play … possibly roll it into a plugin. But the good thing is that now we’ve got a solution started.

Problems that this solution addresses

The above items are some of the questions/topics I see in search engines which this article addresses and solves.

Leave a Reply

Your email address will not be published. Required fields are marked *