The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
elementor popup log...
 
Share:
Notifications
Clear all

[Solved] elementor popup login

11 Posts
2 Users
1 Reactions
3,556 Views
Posts: 12
Topic starter
(@nico39)
Active Member
Joined: 3 years ago

Hi,

 

I try to link my elementor login popup window with WpDiscuz, but it needs a link, but elementor popup just provides us the possibility to open the popup with a selector like:

a[href="#link-loginpopup"]

 

Is there a way to tell WPdiscuz to open the elementor modal login window?

thank you in advance

 

Nico

10 Replies
Asti
Posts: 7617
 Asti
Support
(@asti)
Illustrious Member
Joined: 7 years ago

@nico39,

Please follow this support topic the same question is discussed here: https://wpdiscuz.com/community/troubleshooting/trying-to-add-login-url-using-a-link-pop-up-login-form/#post-3566

Posts: 12
Topic starter
(@nico39)
Active Member
Joined: 3 years ago

thank you very much, 

With the code on the page you indicate I have the following error:

 

syntax error, unexpected '$', expecting variable (T_VARIABLE)

Posts: 12
Topic starter
(@nico39)
Active Member
Joined: 3 years ago

Sorry have added Php snippet code, it's JS

Posts: 12
Topic starter
(@nico39)
Active Member
Joined: 3 years ago

but nothing happen

3 Replies
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7617

@nico39,

Have you customized the code? E.g. you should change the #jeg_loginform id in the code, etc. 

(@nico39)
Joined: 3 years ago

Active Member
Posts: 12

@asti Yes but I think I make an error somewhere...

This is my website setting:

Capture d’écran 2022 03 11 à 15.20.31
Capture d’écran 2022 03 11 à 15.20.52
Capture d’écran 2022 03 11 à 15.20.41
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7617

@nico39,

You should change the IDs according the ID in your case. 

image
Posts: 12
Topic starter
(@nico39)
Active Member
Joined: 3 years ago

Ok I find a solution based on your feedback.

So you need to create an elementor Popup including login module.

 

1. Set the option "Open by a selector" by : .wpd-popup-login-form

Don't forget the dot before. This option is in your popup page by selecting the toothed wheel bottom left of the screen and selecting the "advanced" tab.

Image 12 03 2022 14 21 collée

2. After create a PHP snippet or paste the following code in your (children) theme function.php :

add_filter("wpdiscuz_login_link", function ($login) {
return str_replace(" href=", " class='wpd-popup-login-form' href=", $login);
});

 

Capture d’écran 2022 03 12 à 14.16.32

 and voilà.

Thank you very much Asti !

2 Replies
(@nico39)
Joined: 3 years ago

Active Member
Posts: 12

Sorry forget that:

 

You have to put this JS :

 

(function($){
    $('.wpd-popup-login-form').on('click', function(e){
        e.preventDefault();
        var popuplink = $('wpd-popup-login-form"]');
        if ( popuplink.length > 0 ) {
            popuplink.each(function(i,e){
                var element = $(e);
                if ( element.attr('href') === 'wpd-popup-login-form"]' ) {
                    element.trigger('click');
                    return false;
                }
            })
        }
    });
})(jQuery);
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7617

@nico39,

Thank you for sharing the information. We're going to mark this topic as solved and close it. 

Feel free to open a new topic if you have any other questions. 

Share: