Elementor rendering outside regular loop
-
I update part of a page lately with ajax with posts that have a specific post type and are designed using elementor. On the server, I use this loop to recover the content to be sent, but elementor is not triggered so the content is not rendered correctly. What should I call to fire elementor on this content.
$wpbp = new WP_Query(['post_type' => $type, 'nopaging'=>true, 'post__in'=>$post_id]); $content = ""; if ($wpbp->have_posts()) while($wpbp->have_posts()) { $wpbp->the_post(); $content .= get_the_content(); } wp_reset_query(); return do_shortcode($content);
- The topic ‘Elementor rendering outside regular loop’ is closed to new replies.