I changed the wp-content/plugins/elementor-pro/modules/posts/skins/skin-base.php render() method from this
public function render() {
$this->parent->query_posts();
/** @var \WP_Query $query */
$query = $this->parent->get_query();
if ( ! $query->found_posts ) {
return;
}
$this->render_loop_header();
// It's the global <code>wp_query</code> it self. and the loop was started from the theme.
if ( $query->in_the_loop ) {
$this->current_permalink = get_permalink();
$this->render_post();
} else {
while ( $query->have_posts() ) {
$query->the_post();
$this->current_permalink = get_permalink();
$this->render_post();
}
}
wp_reset_postdata();
$this->render_loop_footer();
}
to this
public function render() {
$this->parent->query_posts();
/** @var \WP_Query $query */
$query = $this->parent->get_query();
if ( ! $query->found_posts ) {
if ( ! $wp_query->found_posts ) {
$this->render_loop_header();
$should_escape = apply_filters( 'elementor_pro/theme_builder/archive/escape_nothing_found_message', true );
$message = $this->parent->get_settings_for_display( 'nothing_found_message' );
if ( $should_escape ) {
$message = esc_html( $message );
}
echo '<div class="elementor-posts-nothing-found">' . $message . '</div>';
$this->render_loop_footer();
return;
}
}
$this->render_loop_header();
// It's the global <code>wp_query</code> it self. and the loop was started from the theme.
if ( $query->in_the_loop ) {
$this->current_permalink = get_permalink();
$this->render_post();
} else {
while ( $query->have_posts() ) {
$query->the_post();
$this->current_permalink = get_permalink();
$this->render_post();
}
}
wp_reset_postdata();
$this->render_loop_footer();
}
and now it is working.
Is right to make the changes I made?