The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
AI Assistant
How to change the l...
 
Notifications
Clear all

[Solved] How to change the login link class??

8 Posts
2 Users
0 Reactions
2,130 Views
(@civilenggnotes)
Posts: 23
Eminent Member
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 
[#1551]

Hello,

I am using a pop up login plugin where i need to add class in link to trigger the pop up, like <a href="#Login" class="lrm-login lrm-hide-if-logged-in" > Login </a> to trigger pop up login when clicked on login text.

Now, in the User Authorization and Profile Data option in the setting i could found the login url, but don't know how to do that.

Please guide me regarding this..


 
Posted : 15/01/2021 1:54 am
Asti
 Asti
(@asti)
Posts: 8284
Illustrious Member Support
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

Hi @civilenggnotes,

You should find all classes that are added on the popup window in the plugin and put it in the class attributes (the red marked codes are just an example, in your case, it may differ) in the code below: 

add_filter("wpdiscuz_login_link", function ($login) {
return str_replace(" href=", " class='swal-menu-item sw-open-login' href=", $login);
});

Put the code in the WordPress active theme functions.php file (more information how to add insert custom code):


In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.

 
Posted : 15/01/2021 1:00 pm
(@civilenggnotes)
Posts: 23
Eminent Member
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

@asti

Sorry.. i couldn't understand where to find and replace code.


 
Posted : 15/01/2021 1:11 pm
Asti
 Asti
(@asti)
Posts: 8284
Illustrious Member Support
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

@civilenggnotes,

Put the code in the WordPress active theme functions.php file. More information on how to add insert custom code you can find here: https://www.wpbeginner.com/plugins/how-to-easily-add-custom-code-in-wordpress-without-breaking-your-site/


In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.

 
Posted : 15/01/2021 1:13 pm
(@civilenggnotes)
Posts: 23
Eminent Member
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

@asti

Thanks a lot.. I will try this and let you know if i face any other problems or it works..


 
Posted : 15/01/2021 1:16 pm
(@civilenggnotes)
Posts: 23
Eminent Member
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

hi @asti

i just added the code you provided, and make the necessary changes. but the problem I am facing now is that when I am clicking on the login link, it is getting refreshed with URL like example.com/test-post/?redirect_to=example.com/test-post and then again I need to click the login link. 

Please have a look at https://www.civilenggnotes.in/differences-between-tmt-bars-hysd-bars/


 
Posted : 15/01/2021 9:24 pm
(@civilenggnotes)
Posts: 23
Eminent Member
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

i add these lines in theme's function.php file.

add_filter("wpdiscuz_login_link", function ($login) {
return str_replace(" href=", " class='lrm-login lrm-hide-if-logged-in' href=", $login);
});


 
Posted : 15/01/2021 9:36 pm
(@civilenggnotes)
Posts: 23
Eminent Member
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

@asti

I guess it was some cache problem, which is now solved I guess.


 
Posted : 15/01/2021 11:58 pm