Category Archives: Elementor

Elementor addons

https://livemeshelementor.com/posts-carousel/
posts carosel

https://www.elementoraddons.com/elements-addon-elements/background-image-slider/
Background image slider

Make shortcode dynamic in Elementor

Problem adding shortcode with static value to template (which is used for all post or products etc) eg

[premmerce_get_bundles_by_main_product_id id="X"]

Create new shortcode, in corporating original shortcode:

function so_extend_frequent_bought_shortcode() {
global $product;
$id = $product->get_id();

return do_shortcode( '[premmerce_get_bundles_by_main_product_id id="' . $id . '"]');
}
add_shortcode( 'my_new_shortcode', 'so_extend_frequent_bought_shortcode' );

Similarily, to add dynamic Javascript to elementor product template:

// shortcode to add tab-click js to product pages
function redraw_data_table_shortcode( $atts ) {
global $product;
$id = $product->get_id();
$output = '
';
return $output;
}
add_shortcode( 'redrawdatatable', 'redraw_data_table_shortcode' );