Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

81
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda