By using’s services you agree to our Cookies Use and Data Transfer outside the EU.
We and our partners operate globally and use cookies, including for analytics, personalisation, ads and Newsletters.

  • Join the Best Unofficial Elementor Support forum

    Provide or get advice on everything Elementor and Wordpress, ask questions, gain confirmation or just become apart of a friendly, like minded community who love Wordpress and Elementor

    Join us!
elementor official

Question Set up dynamic link to image carousel widget



New Member
Hi everyone,

I am creating a listing grid of real estate objects:
Снимок экрана 2019-09-21 в 15.10.21.png

I am using image carousel widget to display photos. This listings are set up by template.
There is an option in this widget, that allows to set up a custom link to whole carousel:
Снимок экрана 2019-09-21 в 15.01.15.png

The problem is that it I want to set up link to the post, that this carousel is related to, but there is no option to set up dynamic link to to carousel. To be clear, I want each carousel to lead to their posts. But as long as I am doing this through the template, there is no way to set up links to each carousel.
Is there any way to make Custom URL field dynamic? May be there is macros (current_url for example) or custom code which can help? Or may be you know a plugin or any other way to do this?


New Member
Hi there, did you ever find a solution for this? Looking for this exact same thing. :)

Thank you in advance if you take the time to reply.


New Member
Here we go :)

add_action( 'elementor/element/image-carousel/section_image_carousel/before_section_end', function( $widget, $args ) {
// First get the control
$control_data = \Elementor\Plugin::instance()->controls_manager->get_control_from_stack( $widget->get_unique_name(),'link' );
if ( is_wp_error( $control_data ) ) {

// Then you can access and modify fields as an array directly
$control_data['dynamic'] = [
'active' => true,

// And then just update the control in the stack/widget
$widget->update_control( 'link', $control_data );
}, 10, 2 );

Latest posts

Latest Resources

Other Elementor Resources

elementor official