Hi there, I have a couple of issues that I would greatly appreciate some assistance with.
My site has yet to launch and go live, and before doing so, I wanted to get some help with setting up my site's user registration and login for wpDisqus. When it comes to web development/WordPress, I would consider myself a level above beginners so please forgive me if I ask a newbie question.
Question 1: Above the chat area, I used to see a "register" and "login" link, but recently users would only be able to access the "login" link. The "register" link has disappeared (see attached image). Would you have any input on why that happened or how I can provide my users with both?
Question 2: My ideal setup for user registration and login would be to have a popup (I've created a login and registration popup form via Elementor and wpforms), allowing users to enter their credentials. After they've successfully entered their credentials, the popup would go away, and they'll be redirected back to the page.
I would be extremely grateful if someone could assist me in addressing my issues. I wouldn't mind compensating someone for their time and effort in providing technical service. If there's Thank you.
Sorry forgot to add image attachment.
So I my "open by selector" for the elementor login popup is a[href="#login"]
When I include it to the code provided (exactly as seen below) I'm getting an error message:
add_filter("wpdiscuz_login_link", function ($login) {
return $login . " or <a href='a[href="#login"]'> register</a>" ;
});
Error Message:
Your PHP code changes were rolled back due to an error on line 221 of file wp-content/themes/hello-elementor/functions.php. Please fix and try saving again.
syntax error, unexpected '}', expecting ';'
Am I doing something wrong here? Thank you.
(I tried adding the changes that you suggested but users will still get the default wordpress login screen)
But I did just see another post with an identical issue https://wpdiscuz.com/community/wpdiscuz-integration/elementor-popup-login/#post-13630
I copied every step in the post but when I get to adding the code the user provided (as seen below) to my function theme I get an error stating
Your PHP code changes were rolled back due to an error on line 219 of file wp-content/themes/hello-elementor/functions.php. Please fix and try saving again.
Do you know what I'm doing wrong here? Thank you.
syntax error, unexpected '$', expecting variable (T_VARIABLE)
(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);
I dont have a lot of time is it possible we can expediate this ticket and get my issue resolved asap.
First, instal woody snippet plugin, after create a PHP snippet and clic "Run everywhere" :
add_filter("wpdiscuz_login_link", function ($login) { return str_replace(" href=", " class='wpd-popup-login-form' href=", $login); });
After, always in Woody Snippet, create a JS snippet and select "Automatic insertion", in insertion location choose "Footer" :
(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);
So now go to Elementor, modal Windows, and before creating the login form, go to the wheel, at the bottom left, go to advanced and in "Open via selector" put and don't forget the dot before :
.wpd-popup-login-form
After that put Elementor Connect widget and save.
If you follow that, there's no reason it shouldn't work