Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

82
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda