Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

80
Views
Display Elementor template through Ajax

I'm trying to display the Media Carousel widget of Elementor dynamically through Ajax.

So, this is my PHP code:

ob_start();
echo do_shortcode('[elementor-template id="3057"]');
$response['content'] = ob_get_contents();
ob_end_clean();
die(wp_json_encode($response));

And my js code:

$.ajax({
    url : ajaxaction.ajax_url,
    type : "post",
    dataType : "json",
    data : {
        action          : "ajax_action",
        action_case     : aj_action_case,
        action_data     : aj_action_data,
    },
    success : function( response ) {
        if ( response.content ) {
            $("#product-main").html(response.content);
            
        }
        ...

In this way I get the media carousel inside my container but of course it's not working because missing the Javascript of the widget.

Is there a way to hook the Javascript of the Elementor widget in my ajax callback?

Or maybe is there a better way to do this...?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!