The target blank is set on links no matter the option you set in elementor “wrappable” panel, so I’ve fixed the code; just replace the before_section_render(Element_Base $element) function, starting on line 77 and ending on line 91 in make-section-clickable-elementor.php , with this version:
public static function before_section_render(Element_Base $element) {
$link_settings = $element->get_settings_for_display('ra_element_link');
if ($link_settings && !empty($link_settings['url'])) {
$target = ( isset( $link_settings['is_external'] ) && $link_settings['is_external'] =='on' ) ? '_blank' : '_self';
$element->add_render_attribute(
'_wrapper',
[
'data-ra-element-link' => json_encode($link_settings),
'style' => 'cursor: pointer',
'target' => $target,
'onClick' => 'window.open("' . $link_settings['url'] . '", "'. $target .'")',
]
);
}
}
You can find the formatted code in this pastebin
https://pastebin.com/3BUsGbMM
-
This reply was modified 1 year, 8 months ago by Mad Max.